add day template
This commit is contained in:
parent
6feb2bb483
commit
976a41461b
34
src/day_template.zig
Normal file
34
src/day_template.zig
Normal file
@ -0,0 +1,34 @@
|
||||
const aoc = @import("./aoc.zig");
|
||||
const std = @import("std");
|
||||
const Allocator = std.mem.Allocator;
|
||||
|
||||
const Input = struct {
|
||||
allocator: Allocator,
|
||||
|
||||
fn deinit(self: Input) void { _ = self; }
|
||||
};
|
||||
|
||||
fn parse_input(allocator: Allocator, lines: []const []const u8) !Input {
|
||||
const parsed = Input {
|
||||
.allocator = allocator,
|
||||
};
|
||||
errdefer parsed.deinit();
|
||||
|
||||
_ = lines;
|
||||
|
||||
return parsed;
|
||||
}
|
||||
|
||||
pub fn part1(input: *aoc.Input) !aoc.Result {
|
||||
const parsed = try parse_input(input.allocator, input.lines);
|
||||
defer parsed.deinit();
|
||||
|
||||
return .{ .uint = 0 };
|
||||
}
|
||||
|
||||
pub fn part2(input: *aoc.Input) !aoc.Result {
|
||||
const parsed = try parse_input(input.allocator, input.lines);
|
||||
defer parsed.deinit();
|
||||
|
||||
return .{ .uint = 0 };
|
||||
}
|
Loading…
Reference in New Issue
Block a user