Better error descriptions.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 08 May 2011 12:14:43 +0200
2 files changed,
2 insertions(+),
2 deletions(-)
M
captcha.go
→
captcha.go
@@ -58,7 +58,7 @@ Expiration = 10 * 60 // 10 minutes
) var ( - ErrNotFound = os.NewError("captcha with the given id not found") + ErrNotFound = os.NewError("captcha: id not found") // globalStore is a shared storage for captchas, generated by New function. globalStore = NewMemoryStore(CollectNum, Expiration) )
M
random.go
→
random.go
@@ -32,7 +32,7 @@ // randomBytes returns a byte slice of the given length read from CSPRNG.
func randomBytes(length int) (b []byte) { b = make([]byte, length) if _, err := io.ReadFull(crand.Reader, b); err != nil { - panic("error reading random source: " + err.String()) + panic("captcha: error reading random source: " + err.String()) } return }