Fix for Go weekly.2012-01-15.

This commit is contained in:
Dmitry Chestnykh 2012-01-16 14:29:26 +01:00
parent 958b406e0e
commit 00f2f1a9e4
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ func NewLenChars(length int, chars []byte) string {
i := 0 i := 0
for { for {
if _, err := io.ReadFull(rand.Reader, r); err != nil { 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 { for _, c := range r {
if c >= maxrb { if c >= maxrb {

View File

@ -12,7 +12,7 @@ func TestNew(t *testing.T) {
for _, c := range u { for _, c := range u {
var present bool var present bool
for _, a := range StdChars { for _, a := range StdChars {
if int(a) == c { if rune(a) == c {
present = true present = true
} }
} }