Browse Source

Fix staticcheck errors

pull/3523/head
Brian Brazil 7 years ago
parent
commit
d7b3df5ae1
  1. 2
      discovery/file/file_test.go
  2. 12
      web/api/v1/api.go

2
discovery/file/file_test.go

@ -76,10 +76,10 @@ func testFileSD(t *testing.T, prefix, ext string, expect bool) {
}()
newf, err := os.Create(filepath.Join(testDir, "_test_"+prefix+ext))
defer newf.Close()
if err != nil {
t.Fatal(err)
}
defer newf.Close()
f, err := os.Open(filepath.Join(testDir, prefix+ext))
if err != nil {

12
web/api/v1/api.go

@ -45,18 +45,18 @@ type status string
const (
statusSuccess status = "success"
statusError = "error"
statusError status = "error"
)
type errorType string
const (
errorNone errorType = ""
errorTimeout = "timeout"
errorCanceled = "canceled"
errorExec = "execution"
errorBadData = "bad_data"
errorInternal = "internal"
errorTimeout errorType = "timeout"
errorCanceled errorType = "canceled"
errorExec errorType = "execution"
errorBadData errorType = "bad_data"
errorInternal errorType = "internal"
)
var corsHeaders = map[string]string{

Loading…
Cancel
Save