enums

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Animal

type Animal string

Animal Type Enum

const (
	// Small domesticated feline
	Animal_Cat Animal = "CAT"
	// Loyal domestic animal
	Animal_Dog Animal = "DOG"
	// Large mammal with a trunk
	Animal_Elephant Animal = "ELEPHANT"
	// Big wild cat
	Animal_Tiger Animal = "TIGER"
	// Marsupial native to Australia
	Animal_Koala Animal = "KOALA"
)

func AnimalOptions

func AnimalOptions() []Animal

func ParseAnimalString

func ParseAnimalString(s string) (Animal, error)

func (Animal) IsValid

func (e Animal) IsValid() bool

func (Animal) String

func (e Animal) String() string

type Car

type Car int

Represents different types of cars.

const (
	// A Sedan is a passenger car that usually has
	// a separate trunk. It's often considered a
	// comfortable and practical choice for families
	// and long-distance travel.
	Car_Sedan Car = 0
	// An SUV (Sport Utility Vehicle) combines the
	// characteristics of a car and an off-road vehicle.
	// It's popular for its higher ground clearance
	// and more cargo space, making it suitable for
	// outdoor activities and urban driving.
	Car_SUV Car = 1
	// A Coupe is a two-door car, typically with a
	// sporty design. It is known for its sleek and
	// stylish appearance, though it often has less
	// rear-seat space compared to a sedan.
	Car_Coupe Car = 2
)

func CarOptions

func CarOptions() []Car

func ParseCarString

func ParseCarString(s string) (Car, error)

func (Car) IsValid

func (e Car) IsValid() bool

func (Car) String

func (e Car) String() string

type Fruit

type Fruit int

Fruit Type Enum This enum represents different types of fruits. Each fruit has a unique value and a label in both English and Traditional Chinese. The comment provides additional information about each fruit.

const (
	// Popular red or green fruit
	Fruit_Apple Fruit = 1
	// Long and yellow fruit
	Fruit_Banana Fruit = 2
	// Small red fruit often used in desserts
	Fruit_Cherry Fruit = 3
	// Small juicy fruit, comes in bunches
	Fruit_Grape Fruit = 4
	// Tropical sweet fruit
	Fruit_Mango Fruit = 5
)

func FruitOptions

func FruitOptions() []Fruit

func ParseFruitString

func ParseFruitString(s string) (Fruit, error)

func (Fruit) IsValid

func (e Fruit) IsValid() bool

func (Fruit) String

func (e Fruit) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL