auth
auth/token.go
Update error strings, add ErrNo*Store errors. Update error strings to consistently begin with a lowercase letter and end without punctuation, as per the Go style guide. See https://code.google.com/p/go-wiki/wiki/CodeReviewComments#Error_Strings For each type of Store, add an ErrNo*Store error (e.g., ErrNoTokenStore) variable, to prepare for our Context type, which will throw these errors when a Store is used without being set.
1.1 --- a/token.go Mon Sep 29 00:58:42 2014 -0400 1.2 +++ b/token.go Wed Oct 15 23:22:19 2014 -0400 1.3 @@ -8,8 +8,9 @@ 1.4 ) 1.5 1.6 var ( 1.7 - ErrTokenNotFound = errors.New("Token not found in TokenStore.") 1.8 - ErrTokenAlreadyExists = errors.New("Token already exists in TokenStore.") 1.9 + ErrNoTokenStore = errors.New("no TokenStore was specified for the Context") 1.10 + ErrTokenNotFound = errors.New("token not found in TokenStore") 1.11 + ErrTokenAlreadyExists = errors.New("token already exists in TokenStore") 1.12 ) 1.13 1.14 type Token struct {