diff --git a/uniuri.go b/uniuri.go index 7b6155f..c9898fd 100644 --- a/uniuri.go +++ b/uniuri.go @@ -51,7 +51,7 @@ func NewLenChars(length int, chars []byte) string { i := 0 for { if _, err := io.ReadFull(rand.Reader, r); err != nil { - panic("error reading from random source: " + err.String()) + panic("error reading from random source: " + err.Error()) } for _, c := range r { if c >= maxrb { diff --git a/uniuri_test.go b/uniuri_test.go index 9899081..e43f213 100644 --- a/uniuri_test.go +++ b/uniuri_test.go @@ -12,7 +12,7 @@ func TestNew(t *testing.T) { for _, c := range u { var present bool for _, a := range StdChars { - if int(a) == c { + if rune(a) == c { present = true } }