File tree 2 files changed +3
-9
lines changed
2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ M.user_agent = "<github.com/csessh/aoc.nvim> by csessh@hey.com"
12
12
--- @param year string | osdate
13
13
local validate_args = function (day , year )
14
14
if day == nil or day == " " then
15
- vim .api .nvim_err_writeln " Missing day "
15
+ vim .api .nvim_err_writeln " Day is not valid or is not specified "
16
16
return false
17
17
end
18
18
19
19
if year == nil or year == " " then
20
- vim .api .nvim_err_writeln " Missing year "
20
+ vim .api .nvim_err_writeln " Year is not valid of is not specified "
21
21
return false
22
22
end
23
23
Original file line number Diff line number Diff line change 25
25
--- @param year string | osdate
26
26
--- @return file* ?
27
27
M .get_cached_input_file = function (day , year )
28
- local f = io.open (cache_path .. year .. day .. " .txt" )
29
-
30
- if not f then
31
- return nil
32
- end
33
-
34
- return f
28
+ return io.open (cache_path .. year .. day .. " .txt" )
35
29
end
36
30
37
31
--- Write cached content to file
You can’t perform that action at this time.
0 commit comments