diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-02-25 13:06:19 +0100 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-02-25 13:06:19 +0100 |
| commit | 536b1f2b33f3d98f607dd8776f8b437d13c200c0 (patch) | |
| tree | 336521357d043d0baf2c8913583afddd19029bf8 /day16.go | |
| parent | 11394225ead868425c29df7576cdee0c22d61c5b (diff) | |
update
Diffstat (limited to 'day16.go')
| -rw-r--r-- | day16.go | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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) } |
