aboutsummaryrefslogtreecommitdiff
path: root/src/pds.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-05-15 15:00:26 -0300
committerEuAndreh <eu@euandre.org>2025-05-15 15:00:26 -0300
commitf80cf3fbed01c7e89b83ace5d9df0334edc01135 (patch)
tree9ddea043971cf299ac3191fa08d957e73a55a661 /src/pds.go
parentsrc/pds.go: Add NewVectorOf() (diff)
downloadpds-f80cf3fbed01c7e89b83ace5d9df0334edc01135.tar.gz
pds-f80cf3fbed01c7e89b83ace5d9df0334edc01135.tar.xz
Setup i18n with gotext
Diffstat (limited to '')
-rw-r--r--src/pds.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pds.go b/src/pds.go
index b853530..9d14648 100644
--- a/src/pds.go
+++ b/src/pds.go
@@ -48,8 +48,12 @@ import (
"reflect"
"sort"
"strings"
+
+ gt "gotext"
)
+
+
// Vector is a dense, ordered, indexed collections. They are analogous to slices
// in Go. They can be updated by appending to the end of the vector, prepending
// values to the beginning of the vector, or updating existing indexes in the
@@ -101,7 +105,9 @@ func (l *Vector[T]) cap() int {
func (l *Vector[T]) Get(index int) T {
if index < 0 || index >= l.size {
panic(fmt.Sprintf(
- "immutable.Vector.Get: index %d out of bounds",
+ gt.Gettext(
+ "immutable.Vector.Get: index %d out of bounds",
+ ),
index,
))
}