summaryrefslogtreecommitdiff
path: root/day16.go
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2023-02-25 13:06:19 +0100
committerMike Vink <mike1994vink@gmail.com>2023-02-25 13:06:19 +0100
commit536b1f2b33f3d98f607dd8776f8b437d13c200c0 (patch)
tree336521357d043d0baf2c8913583afddd19029bf8 /day16.go
parent11394225ead868425c29df7576cdee0c22d61c5b (diff)
update
Diffstat (limited to 'day16.go')
-rw-r--r--day16.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/day16.go b/day16.go
index 0fedb24..27aa028 100644
--- a/day16.go
+++ b/day16.go
@@ -27,6 +27,18 @@ func readValves(f io.Reader) map[string]Valve {
return nil
}
+type indexer interface {
+ Index() int
+}
+
+type proto struct {
+ i int
+}
+
+func (p proto) Index() int {
+ return p.i
+}
+
/*
AA,0 ===================
||.............\\ \\
@@ -48,4 +60,11 @@ func main() {
}
valves := readValves(fh)
fmt.Println(valves)
+
+ p := proto{}
+ ps := []proto{p}
+ ps[0].i = 100
+ fmt.Println(ps)
+ ps[0].i = 314
+ fmt.Println(ps)
}