github.com/onsi/ginkgo@v1.16.6-0.20211118180735-4e1925ba4c95/example/books/books.go (about) 1 package books 2 3 type Book struct { 4 Title string 5 Author string 6 Pages int 7 } 8 9 func (b *Book) CategoryByLength() string { 10 11 if b.Pages >= 300 { 12 return "NOVEL" 13 } 14 15 return "SHORT STORY" 16 }