aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/data
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-12-02 13:23:25 +0100
committerBjørn Erik Pedersen <[email protected]>2020-12-03 13:12:58 +0100
commitd90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch)
tree7b1b14464eefec1188ca2eed53c64e4823453cc9 /tpl/data
parent32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff)
downloadhugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.tar.gz
hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.zip
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'tpl/data')
-rw-r--r--tpl/data/data.go1
-rw-r--r--tpl/data/data_test.go4
-rw-r--r--tpl/data/resources.go2
-rw-r--r--tpl/data/resources_test.go1
4 files changed, 2 insertions, 6 deletions
diff --git a/tpl/data/data.go b/tpl/data/data.go
index 964844336..15d042e0a 100644
--- a/tpl/data/data.go
+++ b/tpl/data/data.go
@@ -35,7 +35,6 @@ import (
// New returns a new instance of the data-namespaced template functions.
func New(deps *deps.Deps) *Namespace {
-
return &Namespace{
deps: deps,
cacheGetCSV: deps.FileCaches.GetCSVCache(),
diff --git a/tpl/data/data_test.go b/tpl/data/data_test.go
index e1839dd48..f9e8621f2 100644
--- a/tpl/data/data_test.go
+++ b/tpl/data/data_test.go
@@ -109,7 +109,7 @@ func TestGetCSV(t *testing.T) {
if _, ok := test.expect.(bool); ok {
c.Assert(int(ns.deps.Log.LogCounters().ErrorCounter.Count()), qt.Equals, 1)
- //c.Assert(err, msg, qt.Not(qt.IsNil))
+ // c.Assert(err, msg, qt.Not(qt.IsNil))
c.Assert(got, qt.IsNil)
continue
}
@@ -199,7 +199,7 @@ func TestGetJSON(t *testing.T) {
if _, ok := test.expect.(bool); ok {
c.Assert(int(ns.deps.Log.LogCounters().ErrorCounter.Count()), qt.Equals, 1)
- //c.Assert(err, msg, qt.Not(qt.IsNil))
+ // c.Assert(err, msg, qt.Not(qt.IsNil))
continue
}
diff --git a/tpl/data/resources.go b/tpl/data/resources.go
index a7b8b3f49..ba98f12b4 100644
--- a/tpl/data/resources.go
+++ b/tpl/data/resources.go
@@ -81,7 +81,6 @@ func (ns *Namespace) getRemote(cache *filecache.Cache, unmarshal func([]byte) (b
}
return nil, err
-
})
if !handled {
@@ -100,7 +99,6 @@ func getLocal(url string, fs afero.Fs, cfg config.Provider) ([]byte, error) {
}
return afero.ReadFile(fs, filename)
-
}
// getResource loads the content of a local or remote file and returns its content and the
diff --git a/tpl/data/resources_test.go b/tpl/data/resources_test.go
index 7350f82f1..5ad0f0970 100644
--- a/tpl/data/resources_test.go
+++ b/tpl/data/resources_test.go
@@ -69,7 +69,6 @@ func TestScpGetLocal(t *testing.T) {
t.Errorf("\nExpected: %s\nActual: %s\n", string(test.content), string(c))
}
}
-
}
func getTestServer(handler func(w http.ResponseWriter, r *http.Request)) (*httptest.Server, *http.Client) {