mirror of
				https://github.com/onyx-and-iris/aoc2024.git
				synced 2025-11-04 06:51:47 +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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user