remove scaffold.sh

add scaffold aoc template
This commit is contained in:
2024-12-27 22:13:33 +00:00
parent 51fed356af
commit 88f082080d
13 changed files with 266 additions and 194 deletions

View File

@@ -0,0 +1,29 @@
package two
import (
"bufio"
"bytes"
"io"
)
func Solve(buf []byte) (int, error) {
r := bytes.NewReader(buf)
err := parseLines(r)
if err != nil {
return 0, err
}
return 0, nil
}
func parseLines(r io.Reader) error {
scanner := bufio.NewScanner(r)
for scanner.Scan() {
}
if err := scanner.Err(); err != nil {
return err
}
return nil
}

View File

@@ -0,0 +1,15 @@
package two
import (
_ "embed"
"os"
"testing"
)
//go:embed testdata/input.txt
var data []byte
func BenchmarkSolve(b *testing.B) {
os.Stdout, _ = os.Open(os.DevNull)
Solve(data)
}

View File

@@ -0,0 +1,18 @@
package two
import (
"bufio"
"io"
)
func parseLines(r io.Reader) error {
scanner := bufio.NewScanner(r)
for scanner.Scan() {
}
if err := scanner.Err(); err != nil {
return err
}
return nil
}