mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-09 14:20:48 +00:00
mv
This commit is contained in:
parent
f7534c78d1
commit
054d372470
@ -35,15 +35,15 @@ func ParseLines(r io.Reader) ([]*machine.Machine, error) {
|
||||
matches = append(matches, m)
|
||||
}
|
||||
|
||||
if err := scanner.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var machines []*machine.Machine
|
||||
for i := 0; i < len(matches); i += 3 {
|
||||
machines = append(machines, machine.New(matches[i], matches[i+1], matches[i+2]))
|
||||
}
|
||||
|
||||
if err := scanner.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return machines, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user