From fa02cb3bc7a0bb0a5b6c2a8340420c50bad628df Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Tue, 10 Dec 2024 21:50:39 +0000 Subject: [PATCH] remove unused functions --- day-10/internal/one/graph.go | 9 --------- day-10/internal/one/util.go | 6 ------ 2 files changed, 15 deletions(-) diff --git a/day-10/internal/one/graph.go b/day-10/internal/one/graph.go index 9c96314..fb8ac9b 100644 --- a/day-10/internal/one/graph.go +++ b/day-10/internal/one/graph.go @@ -1,7 +1,6 @@ package one import ( - "slices" "strings" ) @@ -30,11 +29,3 @@ func (g *graph) isOutOfBounds(p point) bool { func (g *graph) valueAt(p point) rune { return rune(g.data[p.y][p.x]) } - -func (g *graph) debug(path []point) string { - temp := slices.Clone(g.data) - for _, pos := range path { - temp[pos.y] = replaceAtIndex(temp[pos.y], '+', pos.x) - } - return strings.Join(temp, "\n") -} diff --git a/day-10/internal/one/util.go b/day-10/internal/one/util.go index e40e9c2..bb14508 100644 --- a/day-10/internal/one/util.go +++ b/day-10/internal/one/util.go @@ -37,9 +37,3 @@ func parseLines(r io.Reader) (*graph, error) { return graph, nil } - -func replaceAtIndex(s string, r rune, i int) string { - out := []rune(s) - out[i] = r - return string(out) -}