diff options
| author | Shulhan <ms@kilabit.info> | 2024-03-06 03:06:54 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-03-06 03:06:54 +0700 |
| commit | 1e7cb99f42bcd41e98326bd9406d3cecfb2a4542 (patch) | |
| tree | 9981f1ebc98670f516939374012646314dda663f /lib/math | |
| parent | 16607dc13477ee53d95ee0295192643f6e726652 (diff) | |
| download | pakakeh.go-1e7cb99f42bcd41e98326bd9406d3cecfb2a4542.tar.xz | |
all: conform with linter gosec, ineffasign, and makezero
Some of warnings from those linter are false positives, so we just
annotated them.
Diffstat (limited to 'lib/math')
| -rw-r--r-- | lib/math/big/rat_example_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/math/big/rat_example_test.go b/lib/math/big/rat_example_test.go index c78f132b..d1669765 100644 --- a/lib/math/big/rat_example_test.go +++ b/lib/math/big/rat_example_test.go @@ -414,7 +414,7 @@ func ExampleRat_MarshalJSON() { func ExampleRat_MarshalJSON_withStruct() { type T struct { - V *Rat + V *Rat `json:"V"` } inputs := []T{ @@ -430,7 +430,7 @@ func ExampleRat_MarshalJSON_withStruct() { ) MarshalJSONAsString = true for _, in = range inputs { - out, err = json.Marshal(in) + out, err = json.Marshal(&in) if err != nil { log.Fatal(err) } |
