aboutsummaryrefslogtreecommitdiff
path: root/lib/memfs/memfs_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-12-13 01:20:26 +0700
committerShulhan <ms@kilabit.info>2023-12-13 01:20:26 +0700
commit77c0cbe885985e6ccaf530226a34b24fef65b27e (patch)
treebf43f4b7cd879561fc837315a53cf815da473244 /lib/memfs/memfs_test.go
parentbb198ad2d7a3f26c8ee0f32abfc8384c79df404f (diff)
downloadpakakeh.go-77c0cbe885985e6ccaf530226a34b24fef65b27e.tar.xz
all: fix linter warnings reported by revive
There are some reports that I disagree with revive, in example, code should not declare the type after variables. In my opinion, on some cases, declaring the type make the code more readable and explicit. Since I did not want to add new configuration file, we changes it and follow revive for now.
Diffstat (limited to 'lib/memfs/memfs_test.go')
-rw-r--r--lib/memfs/memfs_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/memfs/memfs_test.go b/lib/memfs/memfs_test.go
index 61b50bb7..411d1a06 100644
--- a/lib/memfs/memfs_test.go
+++ b/lib/memfs/memfs_test.go
@@ -394,11 +394,11 @@ func TestMemFS_Get_refresh(t *testing.T) {
filePath string
tag string
path string
- expJson string
+ expJSON string
expError string
fileContent []byte
- rawJson []byte
- gotJson bytes.Buffer
+ rawJSON []byte
+ gotJSON bytes.Buffer
)
for filePath, fileContent = range tdata.Input {
@@ -431,21 +431,21 @@ func TestMemFS_Get_refresh(t *testing.T) {
// Check the tree of MemFS.
- rawJson, err = mfs.Root.JSON(9999, true, false)
+ rawJSON, err = mfs.Root.JSON(9999, true, false)
if err != nil {
t.Fatal(err)
}
- gotJson.Reset()
- err = json.Indent(&gotJson, rawJson, ``, ` `)
+ gotJSON.Reset()
+ err = json.Indent(&gotJSON, rawJSON, ``, ` `)
if err != nil {
t.Fatal(err)
}
test.Assert(t, filePath, string(fileContent), string(node.Content))
- expJson = string(tdata.Output[filePath])
- test.Assert(t, filePath, expJson, gotJson.String())
+ expJSON = string(tdata.Output[filePath])
+ test.Assert(t, filePath, expJSON, gotJSON.String())
}
}