Pointer vs. value receivers are... interesting.
This commit is contained in:
2023-04-04 11:37:02 -07:00
parent 3e34e25f54
commit 99e372a4db
3 changed files with 76 additions and 50 deletions

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 {

View File

@ -28,6 +28,10 @@ func main() {
Name: "Flavor",
Value: "Lemon",
},
Things: 5,
MoreThings: 9,
FloatyThings: 123.456,
Label: "whee",
},
)
p.Name = "Dave"