summaryrefslogtreecommitdiff
path: root/src/scrypt.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-05-15 07:42:45 -0300
committerEuAndreh <eu@euandre.org>2025-05-15 07:42:58 -0300
commit8daf1aa26cd9808299f64c14816176a743e26698 (patch)
treeea7a1bf683981164dd5a2a9abe2411b2d3f540c6 /src/scrypt.go
parentMake: Use $< over $? (diff)
downloadscrypt-8daf1aa26cd9808299f64c14816176a743e26698.tar.gz
scrypt-8daf1aa26cd9808299f64c14816176a743e26698.tar.xz
Setup i18n with gotext(0)
Diffstat (limited to 'src/scrypt.go')
-rw-r--r--src/scrypt.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/scrypt.go b/src/scrypt.go
index 70140ab..511546f 100644
--- a/src/scrypt.go
+++ b/src/scrypt.go
@@ -3,11 +3,12 @@ package scrypt
import (
"crypto/rand"
"encoding/hex"
- "errors"
"fmt"
"io"
"os"
"slices"
+
+ gt "gotext"
)
@@ -32,8 +33,8 @@ const (
var (
- ErrSaltTooSmall = errors.New("scrypt: salt is too small")
- ErrInternal = errors.New("scrypt: internal error")
+ ErrSaltTooSmall = gt.Error(gt.Gettext("scrypt: salt is too small"))
+ ErrInternal = gt.Error(gt.Gettext("scrypt: internal error"))
)
@@ -154,7 +155,7 @@ func Check(input CheckInput) (bool, error) {
func Main() {
if len(os.Args) != 3 {
- fmt.Fprintf(os.Stderr, "Usage: scrypt PASSWORD SALT\n")
+ fmt.Fprintf(os.Stderr, gt.Gettext("Usage: scrypt PASSWORD SALT\n"))
os.Exit(2)
}