This method was also added in c1ffc473f483bc8c1e9619d0a86eaee0237759d9,
when it was used by (Writer).writeVal and MsgWriter.WriteIntf. Commit
8fb918a939a73cd46449037189c826778548885b removed its use from WriteIntf,
and with the removal of (Writer).writeVal, there are no remaining uses.
This function was added in a62e40321a91c38cdcb58138ec58db28f52572c4, but
later split to dedicated rwFloat32Bytes and rwFloat64Bytes functions in
293864c19beb3d1bb4dfb04a55d0da43aab6a14e.
Perhaps it's not "good" practice to do this, but from the looks of it, it
looks like not doing this would be worse. Alternatively, we could panic()
in case the chosen value would potentially DOS the system.
SA3001 - Assigning to b.N in benchmarks distorts the results
The testing package dynamically sets b.N to improve the reliability of
benchmarks and uses it in computations to determine the duration of a
single operation. Benchmark code must not alter b.N as this would
falsify results.
msgp/file_test.go:71:3: SA3001: should not assign to b.N (staticcheck)
b.N = 10000000
^
gen: remove strtoMeth() (unused)
This function was added in 9b8e5157921bd8b18ebbd15b121e383379d0c209, but looks to be unused.
msgp: remove (Writer).writeVal, (Writer).writeStruct (unused)
msgp: remove (*Writer).writeVal
This method was added in c1ffc473f483bc8c1e9619d0a86eaee0237759d9, when it was called by MsgWriter.Encode().
This method was refactored in 8fb918a939a73cd46449037189c826778548885b, which inlined the logic, and renamed it to MsgWriter.WriteIntf.
msgp: remove (*Writer).writeStruct (unused)
This method was also added in c1ffc473f483bc8c1e9619d0a86eaee0237759d9, when it was used by (Writer).writeVal and MsgWriter.WriteIntf. Commit 8fb918a939a73cd46449037189c826778548885b removed its use from WriteIntf, and with the removal of (Writer).writeVal, there are no remaining uses.
msgp: remove rwFloatBytes (unused)
This function was added in a62e40321a91c38cdcb58138ec58db28f52572c4, but later split to dedicated rwFloat32Bytes and rwFloat64Bytes functions in 293864c19beb3d1bb4dfb04a55d0da43aab6a14e.
all: fix linting issues (gosimple, staticcheck)
Fixing some minor linting issues
msgp: BenchmarkWriteReadFile: ignore SA3001 (staticcheck)
Perhaps it's not "good" practice to do this, but from the looks of it, it looks like not doing this would be worse. Alternatively, we could panic() in case the chosen value would potentially DOS the system.
From https://staticcheck.io/docs/checks#SA3001