1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
package enumtype
// FruitType defines a kind of fruits.
// +enum
type FruitType string
// FruitApple is the Apple
const FruitApple FruitType = "apple"
// FruitBanana is the Banana
const FruitBanana FruitType = "banana"
// FruitRiceBall is the Rice ball that does not seem to belong to
// a fruits basket but has a long comment that is so long that it spans
// multiple lines
const FruitRiceBall FruitType = "onigiri"
// FruitsBasket is the type that contains the enum type.
// +k8s:openapi-gen=true
type FruitsBasket struct {
Content FruitType `json:"content"`
// +default=0
Count int `json:"count"`
}
|