Caches should return an error instead of invoking a handler.

This commit is contained in:
Burcu Dogan
2014-06-22 15:19:44 -07:00
parent 8387534dd5
commit ad322e7e30
4 changed files with 12 additions and 18 deletions

View File

@@ -13,8 +13,9 @@ func (m *mockCache) Read() (token *Token, err error) {
return m.token, nil
}
func (m *mockCache) Write(token *Token) {
func (m *mockCache) Write(token *Token) error {
m.token = token
return nil
}
type mockTokenFetcher struct{ token *Token }