diff options
| author | Marcel Beck <marcel@beck.im> | 2019-05-02 18:56:57 +0200 |
|---|---|---|
| committer | Marcel Beck <marcel@beck.im> | 2019-05-02 19:02:56 +0200 |
| commit | b65e14e1fda1c005a07ec9b98e746ce3d699521a (patch) | |
| tree | d141336079455501063b2c11c70fcfd0057d2978 /data | |
| parent | 20937becaa32cdec93e77a84ad04c73e9155b8e7 (diff) | |
chore: Switch from gometalinter to golangci-lint
Github Issue: #546
Diffstat (limited to 'data')
| -rw-r--r-- | data/datasource_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/data/datasource_test.go b/data/datasource_test.go index 32c1219d..ea542b10 100644 --- a/data/datasource_test.go +++ b/data/datasource_test.go @@ -12,6 +12,8 @@ import ( "github.com/stretchr/testify/assert" ) +const osWindows = "windows" + func TestNewData(t *testing.T) { d, err := NewData(nil, nil) assert.NoError(t, err) @@ -63,7 +65,7 @@ func TestParseSourceWithAlias(t *testing.T) { assert.True(t, s.URL.IsAbs()) assert.Equal(t, "/otherdir/foo.json", s.URL.Path) - if runtime.GOOS == "windows" { + if runtime.GOOS == osWindows { s, err = parseSource("data=foo.json") assert.NoError(t, err) assert.Equalf(t, byte(':'), s.URL.Path[1], "Path was %s", s.URL.Path) @@ -111,7 +113,7 @@ func TestDatasource(t *testing.T) { fs := afero.NewMemMapFs() var uPath string var f afero.File - if runtime.GOOS == "windows" { + if runtime.GOOS == osWindows { _ = fs.Mkdir("C:\\tmp", 0777) f, _ = fs.Create("C:\\tmp\\" + fname) _, _ = f.Write(contents) @@ -158,7 +160,7 @@ func TestDatasourceReachable(t *testing.T) { fs := afero.NewMemMapFs() var uPath string var f afero.File - if runtime.GOOS == "windows" { + if runtime.GOOS == osWindows { _ = fs.Mkdir("C:\\tmp", 0777) f, _ = fs.Create("C:\\tmp\\" + fname) uPath = "C:/tmp/" + fname @@ -205,7 +207,7 @@ func TestInclude(t *testing.T) { var uPath string var f afero.File - if runtime.GOOS == "windows" { + if runtime.GOOS == osWindows { _ = fs.Mkdir("C:\\tmp", 0777) f, _ = fs.Create("C:\\tmp\\" + fname) uPath = "C:/tmp/" + fname |
