add a little scaffold for new days

This commit is contained in:
David 2020-12-12 11:26:47 -05:00
parent 24b59f71fa
commit 55fa312abf
2 changed files with 44 additions and 0 deletions

37
main.go.tmpl Normal file
View File

@ -0,0 +1,37 @@
package main
import (
"bufio"
"fmt"
"os"
"time"
)
func main() {
start := time.Now()
partOne()
duration := time.Since(start)
partTwo()
duration2 := time.Since(start)
fmt.Printf("p1: %s, p2: %s\n", duration, duration2-duration)
}
func partOne() {
f, _ := os.Open("input")
reader := bufio.NewReader(f)
scanner := bufio.NewScanner(reader)
for scanner.Scan() {
// line := scanner.Text()
}
}
func partTwo() {
f, _ := os.Open("input")
reader := bufio.NewReader(f)
scanner := bufio.NewScanner(reader)
for scanner.Scan() {
// line := scanner.Text()
}
}

7
new.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
if [ "${1}" != "" ]; then
mkdir ${1}
touch ${1}/input
cp main.go.tmpl ${1}/main.go
fi