diff options
| author | Shulhan <ms@kilabit.info> | 2024-03-26 23:58:33 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-03-27 00:15:33 +0700 |
| commit | 88085dfc4f3b38489968038ce33533d87ed55876 (patch) | |
| tree | f87bd930db4ca53384e64258d8b4482639a05ba6 /client_test.go | |
| parent | 4048680d115cfd3ac7f682f02565efb42237d05e (diff) | |
| download | rescached-88085dfc4f3b38489968038ce33533d87ed55876.tar.xz | |
all: comply with linters
Fix the code as recommended by linters, for example using context for
HTTP client request, using 0600 for file permission, using string
concatenation instead of fmt, using "%w" for error, and reorder defer.
Diffstat (limited to 'client_test.go')
| -rw-r--r-- | client_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client_test.go b/client_test.go index 8398004..711b626 100644 --- a/client_test.go +++ b/client_test.go @@ -108,7 +108,7 @@ func TestClient_BlockdFetch(t *testing.T) { // Revert the content of a.block. t.Cleanup(func() { - err = os.WriteFile(affectedBlockd.fileDisabled, []byte("127.0.0.1 a.block\n"), 0644) + err = os.WriteFile(affectedBlockd.fileDisabled, []byte("127.0.0.1 a.block\n"), 0600) }) expString = `BlockdFetch: 400 httpAPIBlockdFetch: unknown hosts block.d name: xxx` |
