upd scaffold

This commit is contained in:
onyx-and-iris 2024-12-03 14:42:35 +00:00
parent f0bf82c96a
commit d32b376619
2 changed files with 17 additions and 3 deletions

6
.gitignore vendored
View File

@ -26,5 +26,7 @@ go.work.sum
.env .env
# input files # input files
partial.txt **/testdata/*.txt
input.txt
# scaffold
mkfiles.sh

View File

@ -56,6 +56,18 @@ func main() {
} }
EOT EOT
touch "$name"/solve.go
cat <<EOT >> "$name"/makefile
package name
func Solve(data []byte) (int, int, error) {
return 0, 0, nil
}
EOT
cd "$name" || exit cd "$name" || exit
go mod init github.com/onyx-and-iris/aoc2024/"$name" go mod init github.com/onyx-and-iris/aoc2024/"$name"
MKFILES=../mkfiles.sh
[[ -f $MKFILES ]] && ln -s $MKFILES .