rename data to inputBuf (free up data as variable/type name)

This commit is contained in:
onyx-and-iris 2024-12-29 08:49:51 +00:00
parent 156c1c13e0
commit 0f48ed35ea
5 changed files with 8 additions and 12 deletions

View File

@ -1,8 +1,6 @@
package one
import (
"bytes"
)
import "bytes"
func Solve(buf []byte) (int, error) {
r := bytes.NewReader(buf)

View File

@ -7,9 +7,9 @@ import (
)
//go:embed testdata/input.txt
var data []byte
var inputBuf []byte
func BenchmarkSolve(b *testing.B) {
os.Stdout, _ = os.Open(os.DevNull)
Solve(data)
Solve(inputBuf)
}

View File

@ -1,8 +1,6 @@
package two
import (
"bytes"
)
import "bytes"
func Solve(buf []byte) (int, error) {
r := bytes.NewReader(buf)

View File

@ -7,9 +7,9 @@ import (
)
//go:embed testdata/input.txt
var data []byte
var inputBuf []byte
func BenchmarkSolve(b *testing.B) {
os.Stdout, _ = os.Open(os.DevNull)
Solve(data)
Solve(inputBuf)
}

View File

@ -7,9 +7,9 @@ import (
)
//go:embed testdata/input.txt
var data []byte
var inputBuf []byte
func BenchmarkSolve(b *testing.B) {
os.Stdout, _ = os.Open(os.DevNull)
Solve(data)
Solve(inputBuf)
}