all: cleanup unused code, part 1 (#10661)

Run `staticcheck` with `U1000` to find unused code. This cleans up about
a half of it. I'll do the other half separately to keep PRs manageable.

Updates #cleanup

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
Andrew Lytvynov
2023-12-20 16:50:30 -06:00
committed by GitHub
parent 3c333f6341
commit 1302bd1181
26 changed files with 81 additions and 274 deletions

View File

@@ -342,11 +342,11 @@ func getVal() *tailscaleTypes {
}
type IntThenByte struct {
i int
b byte
_ int
_ byte
}
type TwoInts struct{ a, b int }
type TwoInts struct{ _, _ int }
type IntIntByteInt struct {
i1, i2 int32
@@ -355,7 +355,6 @@ type IntIntByteInt struct {
}
func u8(n uint8) string { return string([]byte{n}) }
func u16(n uint16) string { return string(binary.LittleEndian.AppendUint16(nil, n)) }
func u32(n uint32) string { return string(binary.LittleEndian.AppendUint32(nil, n)) }
func u64(n uint64) string { return string(binary.LittleEndian.AppendUint64(nil, n)) }
func ux(n uint) string {