Pointer vs. value receivers are... interesting.
This commit is contained in:
kistaro committed 2023-04-04 11:37:02 -07:00
1 parent 3e34e25f54
commit 99e372a4db
3 files changed
+76 -50

No files matched your search

+1
View File
@@ -15,6 +15,7 @@ type SmokeTestCollection struct {
Things int `cardsim:"stat"`
MoreThings int `cardsim:"hidden"`
FloatyThings float64 `cardsim:"round1"`
Label string `cardsim:"stat"`
}
func (c *SmokeTestCollection) Average() float64 {
+4
View File
@@ -28,6 +28,10 @@ func main() {
Name: "Flavor",
Value: "Lemon",
},
Things: 5,
MoreThings: 9,
FloatyThings: 123.456,
Label: "whee",
},
)
p.Name = "Dave"