Change lint options

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
Jakub Sztandera
2019-07-10 15:42:18 +02:00
parent 898454ca9a
commit 8cd484a8b0
3 changed files with 12 additions and 5 deletions
+3
View File
@@ -25,12 +25,14 @@ const (
fsLock = "repo.lock"
)
// FsRepo is struct for repo, use NewFS to create
type FsRepo struct {
path string
}
var _ Repo = &FsRepo{}
// APIEndpoint returns endpoint of API in this repo
func (fsr *FsRepo) APIEndpoint() (multiaddr.Multiaddr, error) {
p := filepath.Join(fsr.path, fsAPI)
f, err := os.Open(p)
@@ -56,6 +58,7 @@ func (fsr *FsRepo) APIEndpoint() (multiaddr.Multiaddr, error) {
return apima, nil
}
// Lock acquires exclusive lock on this repo
func (fsr *FsRepo) Lock() (LockedRepo, error) {
closer, err := fslock.Lock(fsr.path, fsLock)
if err != nil {