fixing ineffassign issues

This commit is contained in:
Julien Neuhart
2019-10-03 11:59:48 +02:00
parent 6f8c7a613f
commit d65d9c9a4c
3 changed files with 2 additions and 1 deletions

View File

@@ -19,7 +19,6 @@ func TestPingHandler(t *testing.T) {
// should return 200.
config := conf.DefaultConfig()
srv := New(config)
srv = New(config)
req := httptest.NewRequest(http.MethodGet, pingEndpoint, nil)
test.AssertStatusCode(t, http.StatusOK, srv, req)
}

View File

@@ -35,6 +35,7 @@ func TestHeaderFooterContents(t *testing.T) {
assert.Nil(t, err)
defer f2.Close() // nolint: errcheck
err = r.WithFile("footer.html", f2)
assert.Nil(t, err)
header, footer, err = HeaderFooterContents(r, config)
assert.Nil(t, err)
assert.Contains(t, header, expected)

View File

@@ -261,6 +261,7 @@ func TestFcontent(t *testing.T) {
err = r.WithFile(filename, f)
assert.Nil(t, err)
v, err = r.Fcontent(filename, defaultValue)
assert.Nil(t, err)
assert.Contains(t, v, defaultValue)
// finally...
err = r.Close()