Fix for Go weekly.2012-01-15.
This commit is contained in:
parent
958b406e0e
commit
00f2f1a9e4
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user