Book represents information about a book.
| 2 | |
| 3 | // Book represents information about a book. |
| 4 | type Book struct { |
| 5 | Title string |
| 6 | Author string |
| 7 | Copies int |
| 8 | ID int |
| 9 | PriceCents int |
| 10 | DiscountPercent int |
| 11 | } |
| 12 | |
| 13 | func (b Book) NetPriceCents() int { |
| 14 | saving := b.PriceCents * b.DiscountPercent / 100 |
nothing calls this directly
no outgoing calls
no test coverage detected