mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 22:19:40 -08:00
Fix staticcheck errors
This commit is contained in:
parent
29506e0bca
commit
d7b3df5ae1
|
@ -76,10 +76,10 @@ func testFileSD(t *testing.T, prefix, ext string, expect bool) {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
newf, err := os.Create(filepath.Join(testDir, "_test_"+prefix+ext))
|
newf, err := os.Create(filepath.Join(testDir, "_test_"+prefix+ext))
|
||||||
defer newf.Close()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
defer newf.Close()
|
||||||
|
|
||||||
f, err := os.Open(filepath.Join(testDir, prefix+ext))
|
f, err := os.Open(filepath.Join(testDir, prefix+ext))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -45,18 +45,18 @@ type status string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
statusSuccess status = "success"
|
statusSuccess status = "success"
|
||||||
statusError = "error"
|
statusError status = "error"
|
||||||
)
|
)
|
||||||
|
|
||||||
type errorType string
|
type errorType string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
errorNone errorType = ""
|
errorNone errorType = ""
|
||||||
errorTimeout = "timeout"
|
errorTimeout errorType = "timeout"
|
||||||
errorCanceled = "canceled"
|
errorCanceled errorType = "canceled"
|
||||||
errorExec = "execution"
|
errorExec errorType = "execution"
|
||||||
errorBadData = "bad_data"
|
errorBadData errorType = "bad_data"
|
||||||
errorInternal = "internal"
|
errorInternal errorType = "internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
var corsHeaders = map[string]string{
|
var corsHeaders = map[string]string{
|
||||||
|
|
Loading…
Reference in a new issue