From 0f2006ac508f3ab69349349453496a5be9325200 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Sat, 11 Apr 2020 11:02:06 +0100 Subject: [PATCH] fix compilation issues --- api/server/acme/certmagic/storage.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/server/acme/certmagic/storage.go b/api/server/acme/certmagic/storage.go index dc805e98..4e26b888 100644 --- a/api/server/acme/certmagic/storage.go +++ b/api/server/acme/certmagic/storage.go @@ -11,7 +11,7 @@ import ( "github.com/mholt/certmagic" "github.com/micro/go-micro/v2/store" - "github.com/micro/go-micro/v2/sync/lock" + "github.com/micro/go-micro/v2/sync" ) // File represents a "File" that will be stored in store.Store - the contents and last modified time @@ -26,16 +26,16 @@ type File struct { // As certmagic storage expects a filesystem (with stat() abilities) we have to implement // the bare minimum of metadata. type storage struct { - lock lock.Lock + lock sync.Sync store store.Store } func (s *storage) Lock(key string) error { - return s.lock.Acquire(key, lock.TTL(10*time.Minute)) + return s.lock.Lock(key, sync.LockTTL(10*time.Minute)) } func (s *storage) Unlock(key string) error { - return s.lock.Release(key) + return s.lock.Unlock(key) } func (s *storage) Store(key string, value []byte) error { @@ -139,7 +139,7 @@ func (s *storage) Stat(key string) (certmagic.KeyInfo, error) { } // NewStorage returns a certmagic.Storage backed by a go-micro/lock and go-micro/store -func NewStorage(lock lock.Lock, store store.Store) certmagic.Storage { +func NewStorage(lock sync.Sync, store store.Store) certmagic.Storage { return &storage{ lock: lock, store: store,