aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/data/resources_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-03-24 10:11:16 +0100
committerBjørn Erik Pedersen <[email protected]>2019-03-24 16:14:51 +0100
commitb5f39d23b86f9cb83c51da9fe4abb4c19c01c3b7 (patch)
treecf23180dc07698391cf47c2fe525755417729020 /tpl/data/resources_test.go
parent3011f36c27ecde309325e6c75ca377f4f87fa97a (diff)
downloadhugo-b5f39d23b86f9cb83c51da9fe4abb4c19c01c3b7.tar.gz
hugo-b5f39d23b86f9cb83c51da9fe4abb4c19c01c3b7.zip
all: Apply staticcheck recommendations
Diffstat (limited to 'tpl/data/resources_test.go')
-rw-r--r--tpl/data/resources_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/tpl/data/resources_test.go b/tpl/data/resources_test.go
index d1091b23f..a42232f94 100644
--- a/tpl/data/resources_test.go
+++ b/tpl/data/resources_test.go
@@ -114,9 +114,9 @@ func TestScpGetRemote(t *testing.T) {
ns.client = cl
var c []byte
- f := func(b []byte) (error, bool) {
+ f := func(b []byte) (bool, error) {
c = b
- return nil, false
+ return false, nil
}
err = ns.getRemote(cache, f, req)
@@ -158,15 +158,15 @@ func TestScpGetRemoteParallel(t *testing.T) {
defer wg.Done()
for j := 0; j < 10; j++ {
var c []byte
- f := func(b []byte) (error, bool) {
+ f := func(b []byte) (bool, error) {
c = b
- return nil, false
+ return false, nil
}
err := ns.getRemote(ns.cacheGetJSON, f, req)
assert.NoError(t, err)
if string(content) != string(c) {
- t.Fatalf("expected\n%q\ngot\n%q", content, c)
+ t.Errorf("expected\n%q\ngot\n%q", content, c)
}
time.Sleep(23 * time.Millisecond)