From 62b54eb0091db1eab70082c7a9b16d6be28f5ac2 Mon Sep 17 00:00:00 2001 From: Umputun Date: Thu, 17 Jan 2019 18:50:02 -0600 Subject: [PATCH] resort imports --- backend/app/cmd/server.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/backend/app/cmd/server.go b/backend/app/cmd/server.go index 86753024..88f31f14 100644 --- a/backend/app/cmd/server.go +++ b/backend/app/cmd/server.go @@ -13,9 +13,8 @@ import ( "time" bolt "github.com/coreos/bbolt" - "github.com/go-pkgz/lgr" log "github.com/go-pkgz/lgr" - acache "github.com/patrickmn/go-cache" + auth_cache "github.com/patrickmn/go-cache" "github.com/pkg/errors" "github.com/go-pkgz/auth" @@ -553,7 +552,7 @@ func (s *ServerCommand) makeAuthenticator(ds *service.DataStore, avas avatar.Sto AvatarStore: avas, AvatarResizeLimit: s.Avatar.RszLmt, AvatarRoutePath: "/api/v1/avatar", - Logger: lgr.Default(), + Logger: log.Default(), RefreshCache: newAuthRefreshCache(), }) s.addAuthProviders(authenticator) @@ -562,11 +561,11 @@ func (s *ServerCommand) makeAuthenticator(ds *service.DataStore, avas avatar.Sto // authRefreshCache used by authenticator to minimize repeatable token refreshes type authRefreshCache struct { - *acache.Cache + *auth_cache.Cache } func newAuthRefreshCache() *authRefreshCache { - return &authRefreshCache{Cache: acache.New(5*time.Minute, 10*time.Minute)} + return &authRefreshCache{Cache: auth_cache.New(5*time.Minute, 10*time.Minute)} } func (c *authRefreshCache) Get(key interface{}) (interface{}, bool) { @@ -574,5 +573,5 @@ func (c *authRefreshCache) Get(key interface{}) (interface{}, bool) { } func (c *authRefreshCache) Set(key, value interface{}) { - c.Cache.Set(key.(string), value, acache.DefaultExpiration) + c.Cache.Set(key.(string), value, auth_cache.DefaultExpiration) }