add: type assertion
This commit is contained in:
@ -14,6 +14,8 @@ type puzzle struct {
|
||||
price money
|
||||
}
|
||||
|
||||
// if you remove this method,
|
||||
// you can no longer add it to the `store` in `main()`.
|
||||
func (p puzzle) print() {
|
||||
fmt.Printf("%-15s: %s\n", p.title, p.price.string())
|
||||
}
|
||||
|
Reference in New Issue
Block a user