mirror of
https://github.com/Threnklyn/advent-of-code-go.git
synced 2026-06-01 01:38:28 +02:00
2018 day06 solution, patch 2020 scripts missing flag.Parse()
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func StrToInt(in string) int {
|
||||
num, err := strconv.Atoi(in)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("converting string to number: %s", err))
|
||||
}
|
||||
return num
|
||||
}
|
||||
Reference in New Issue
Block a user