2019 Day 10 Complete

This commit is contained in:
2019-12-10 09:17:50 -06:00
parent 1a8a0d3099
commit aeeab9885f
9 changed files with 230 additions and 0 deletions

View File

@@ -27,6 +27,13 @@ const (
MIN_INT = -MAX_INT - 1
)
func AbsInt(i int) int {
if i < 0 {
return i * -1
}
return i
}
func ArgIsSet(a string) bool {
for i := range os.Args {
if os.Args[i] == a || strings.HasPrefix(os.Args[i], a+"=") {