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

Struct Book

22.2/bookstore.go:6–14  ·  view source on GitHub ↗

Book represents information about a book.

Source from the content-addressed store, hash-verified

4
5// Book represents information about a book.
6type Book struct {
7 Title string
8 Author string
9 Copies int
10 ID int
11 PriceCents int
12 DiscountPercent int
13 category string
14}
15
16func (b *Book) SetCategory(category string) error {
17 if category != "Autobiography" {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected