diff options
author | EuAndreh <eu@euandre.org> | 2025-05-14 17:17:50 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-05-14 17:36:00 -0300 |
commit | 07276d16b83d2fd78ac8948da89820337160e278 (patch) | |
tree | 2baa874af86357e9760f1f977e7d6870e313cbed /src/uuid.go | |
parent | doc/: Add uuid.en.{0,3,7.{CHANGELOG,README,TODOs,recipes,tutorial,why}}.adoc (diff) | |
download | uuid-07276d16b83d2fd78ac8948da89820337160e278.tar.gz uuid-07276d16b83d2fd78ac8948da89820337160e278.tar.xz |
Revamp i18n: use gotext
Diffstat (limited to 'src/uuid.go')
-rw-r--r-- | src/uuid.go | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/uuid.go b/src/uuid.go index fa1e958..c99f20b 100644 --- a/src/uuid.go +++ b/src/uuid.go @@ -4,13 +4,14 @@ import ( "crypto/rand" "encoding/binary" "encoding/hex" - "errors" "flag" "fmt" "io" "os" "strings" "time" + + gt "gotext" ) @@ -39,11 +40,15 @@ var ( dashIndexes = []int{ 8, 13, 18, 23 } randomReader = rand.Reader - ErrBadLength = errors.New( + ErrBadLength = gt.Error(gt.Gettext( "uuid: str isn't of the correct length", - ) - ErrBadDashCount = errors.New("uuid: Bad count of dashes in string") - ErrBadDashPosition = errors.New("uuid: Bad char in string") + )) + ErrBadDashCount = gt.Error(gt.Gettext( + "uuid: Bad count of dashes in string", + )) + ErrBadDashPosition = gt.Error(gt.Gettext( + "uuid: Bad char in string", + )) DefaultVersion = 4 |