MCPcopy Create free account
hub / github.com/bitfield/ftl-code / Book

Struct Book

18.2/bookstore.go:4–11  ·  view source on GitHub ↗

Book represents information about a book.

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected