Add config for golangci-lint

This commit is contained in:
Alexander Neumann
2021-01-31 13:07:18 +01:00
parent a659f3d879
commit 980bff189e
2 changed files with 69 additions and 2 deletions

View File

@@ -79,7 +79,12 @@ func TestGetHandler(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer os.Remove(dir)
defer func() {
err := os.Remove(dir)
if err != nil {
t.Fatal(err)
}
}()
// With NoAuth = false and no .htpasswd
_, err = getHandler(restserver.Server{Path: dir})
@@ -99,7 +104,12 @@ func TestGetHandler(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer os.Remove(htpasswd)
defer func() {
err := os.Remove(htpasswd)
if err != nil {
t.Fatal(err)
}
}()
// With NoAuth = false and with .htpasswd
_, err = getHandler(restserver.Server{Path: dir})