mirror of
https://github.com/RussellChamp/advent-of-code-2021.git
synced 2026-10-27 21:52:32 +00:00
day 14 and 15
This commit is contained in:
1 parent
6e22bbe567
commit
4737afa383
12 files changed
+678
-3
No files matched your search
@@ -0,0 +1,15 @@
|
||||
package args
|
||||
|
||||
import "strings"
|
||||
|
||||
func Parse(args []string) map[string]string {
|
||||
argMap := make(map[string]string)
|
||||
for _, arg := range args {
|
||||
pair := strings.Split(arg, "=")
|
||||
if len(pair) == 2 {
|
||||
argMap[pair[0]] = pair[1]
|
||||
}
|
||||
}
|
||||
|
||||
return argMap
|
||||
}
|
||||
Reference in new issue
Block a user