Skip to content

Commit ba656c3

Browse files
committed
refactor: consistent naming
1 parent 1f66ec4 commit ba656c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

2021/22/part2.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func main() {
9595
}
9696
defer file.Close()
9797

98-
r := regexp.MustCompile(`^(on|off) x=([-]?\d+)..([-]?\d+),y=([-]?\d+)..([-]?\d+),z=([-]?\d+)..([-]?\d+)$`)
98+
cuboidRegexp := regexp.MustCompile(`^(on|off) x=([-]?\d+)..([-]?\d+),y=([-]?\d+)..([-]?\d+),z=([-]?\d+)..([-]?\d+)$`)
9999

100100
space := Space{}
101101

@@ -105,7 +105,7 @@ func main() {
105105
if len(line) == 0 {
106106
continue
107107
}
108-
matches := r.FindStringSubmatch(line)
108+
matches := cuboidRegexp.FindStringSubmatch(line)
109109
if len(matches) > 0 {
110110
state := false
111111
if matches[1] == "on" {

0 commit comments

Comments
 (0)