INNER CODE UNIT · Go
BookStatus
learning-cloud-native-go/myapp · model/book_status.go:13
BookStatusPending BookStatus = iota // 0
BookStatusVerified // 1
)
const (
BookStatusPendingStr = "pending"
BookStatusVerifiedStr = "verified"
)
var mapBookStatusStrToInt = map[string]BookStatus{
BookStatusPendingStr: BookStatusPending,
BookStatusVerifiedStr: BookStatusVerified,
}
var mapBookStatusIntToStr = map[BookStatus]string{
BookStatusPending: BookStatusPendingStr,
BookStatusVerified: BookStatusVerifiedStr,
}