host-local disk backend store uses FileLock by reference

- this change fixes go vet warnings for the package
This commit is contained in:
Gabe Rosenhouse 2017-08-29 20:26:37 -07:00 committed by Gabriel Rosenhouse
parent b49379d284
commit 2f957864ea

View File

@ -31,7 +31,7 @@ var defaultDataDir = "/var/lib/cni/networks"
// Store is a simple disk-backed store that creates one file per IP // Store is a simple disk-backed store that creates one file per IP
// address in a given directory. The contents of the file are the container ID. // address in a given directory. The contents of the file are the container ID.
type Store struct { type Store struct {
FileLock *FileLock
dataDir string dataDir string
} }
@ -51,7 +51,7 @@ func New(network, dataDir string) (*Store, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &Store{*lk, dir}, nil return &Store{lk, dir}, nil
} }
func (s *Store) Reserve(id string, ip net.IP, rangeID string) (bool, error) { func (s *Store) Reserve(id string, ip net.IP, rangeID string) (bool, error) {