From 1f37a7a7f3132e7c0afefd15e75bc2047e48aa55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luna=20=C5=9Awi=C4=85tek?= Date: Tue, 26 Dec 2023 03:23:27 +0100 Subject: [PATCH] init day03 --- day03/day03.go | 35 +++++++++++++++++++++++++++++++++++ day03/example.txt | 10 ++++++++++ 2 files changed, 45 insertions(+) create mode 100644 day03/day03.go create mode 100644 day03/example.txt diff --git a/day03/day03.go b/day03/day03.go new file mode 100644 index 0000000..5bbfd25 --- /dev/null +++ b/day03/day03.go @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "io" + "os" + "strings" +) + +func readInput() string { + stdin, err := io.ReadAll(os.Stdin) + + if err != nil { + panic(err) + } + str := string(stdin) + return str +} + +func part1(lines []string) { + fmt.Println("Part 1 not implemented") +} + +func part2(lines []string) { + fmt.Println("Part 2 not implemented") +} + +func main() { + input := readInput() + lines := strings.Split(input, "\n") + fmt.Println("---PART 1---") + part1(lines) + fmt.Println("---PART 2---") + part2(lines) +} diff --git a/day03/example.txt b/day03/example.txt new file mode 100644 index 0000000..b20187f --- /dev/null +++ b/day03/example.txt @@ -0,0 +1,10 @@ +467..114.. +...*...... +..35..633. +......#... +617*...... +.....+.58. +..592..... +......755. +...$.*.... +.664.598..