fix: replace Split with SplitSeq as it's a loop (thanks lsp)
This commit is contained in:
1 parent
b8ab5fae7b
commit
8e831d85fe
1 file changed
+1
-1
@@ -15,7 +15,7 @@ func init() {
|
||||
func ParseInput(filepath string) map[string]string {
|
||||
content, _ := os.ReadFile(filepath)
|
||||
instructions := make(map[string]string)
|
||||
for _, line := range strings.Split(string(content), "\n") {
|
||||
for line := range strings.SplitSeq(string(content), "\n") {
|
||||
if parts := strings.Split(line, " -> "); len(parts) == 2 {
|
||||
instructions[parts[1]] = parts[0]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user