Update template for easier input debugging
This commit is contained in:
parent
92334ee1a6
commit
8cd6e34a29
1 changed files with 11 additions and 4 deletions
15
dayN.exs
15
dayN.exs
|
@ -3,16 +3,23 @@ defmodule DayREPLACE_ME do
|
|||
input
|
||||
end
|
||||
|
||||
def part2(input) do
|
||||
input
|
||||
def part2(_input) do
|
||||
:ok
|
||||
end
|
||||
|
||||
def run do
|
||||
case input() do
|
||||
:usage -> print_usage()
|
||||
input -> run_parts_with_timer(input)
|
||||
end
|
||||
end
|
||||
|
||||
def input do
|
||||
with [input_filename] <- System.argv(),
|
||||
{:ok, input} <- File.read(input_filename) do
|
||||
run_parts_with_timer(input)
|
||||
input
|
||||
else
|
||||
_ -> print_usage()
|
||||
_ -> :usage
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue