Hermitise and bump golangci-lint.

This commit is contained in:
Alec Thomas
2021-06-09 12:37:06 +10:00
parent c4a8cb03a7
commit 6cebaa7b85
23 changed files with 95 additions and 28 deletions
+3 -2
View File
@@ -6,8 +6,9 @@ import (
"os"
"testing"
"github.com/alecthomas/kong"
"github.com/stretchr/testify/require"
"github.com/alecthomas/kong"
)
func TestMultipleConfigLoading(t *testing.T) {
@@ -47,7 +48,7 @@ func makeConfig(t *testing.T, config interface{}) (path string, cleanup func())
t.Helper()
w, err := ioutil.TempFile("", "")
require.NoError(t, err)
defer w.Close()
defer w.Close() // nolint: gosec
err = json.NewEncoder(w).Encode(config)
require.NoError(t, err)
return w.Name(), func() { os.Remove(w.Name()) }