Clean up some debugging
This commit is contained in:
parent
5a41654e57
commit
9a8de11888
@ -21,7 +21,6 @@ func part1(inp string) {
|
|||||||
for _, v := range cmds {
|
for _, v := range cmds {
|
||||||
var num1, num2 int
|
var num1, num2 int
|
||||||
fmt.Sscanf(v, "mul(%d,%d)", &num1, &num2)
|
fmt.Sscanf(v, "mul(%d,%d)", &num1, &num2)
|
||||||
fmt.Printf("%s -> %d * %d = %d\n", v, num1, num2, num1*num2)
|
|
||||||
total = total + (num1 * num2)
|
total = total + (num1 * num2)
|
||||||
}
|
}
|
||||||
fmt.Println("# Part 1")
|
fmt.Println("# Part 1")
|
||||||
@ -35,8 +34,6 @@ func part2(inp string) {
|
|||||||
var cmd Command
|
var cmd Command
|
||||||
prev := inp
|
prev := inp
|
||||||
cmd, inp = getNextCommand(inp)
|
cmd, inp = getNextCommand(inp)
|
||||||
fmt.Println("Processing Command:", cmd)
|
|
||||||
fmt.Println("Remainder:", inp)
|
|
||||||
if prev == inp {
|
if prev == inp {
|
||||||
panic("Remainder didn't change")
|
panic("Remainder didn't change")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user