2021 Day 19 Part 1
This commit is contained in:
parent
e77a316ee6
commit
7b389121b0
2 changed files with 251 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ package aoc
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/fs"
|
||||
"os"
|
||||
|
|
@ -103,3 +104,9 @@ func Ints(text string) (ns []int) {
|
|||
func ExLines(text string) []string {
|
||||
return strings.Split(strings.TrimSpace(text), "\n")
|
||||
}
|
||||
|
||||
func MustScan(text, format string, dests ...interface{}) {
|
||||
if _, err := fmt.Sscanf(text, format, dests...); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue