example

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2017 License: MIT Imports: 2 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 int32

Animal x ENUM( Cat, Dog, Fish )

const (
	// AnimalCat is a Animal of type Cat
	AnimalCat Animal = iota
	// AnimalDog is a Animal of type Dog
	AnimalDog
	// AnimalFish is a Animal of type Fish
	AnimalFish
)

func ParseAnimal

func ParseAnimal(name string) (Animal, error)

ParseAnimal attempts to convert a string to a Animal

func (Animal) String

func (i Animal) String() string

type Color

type Color int

Color is an enumeration of colors that are allowed.

ENUM(

Black, White, Red Green = 33

Blue grey= yellow )

const (
	// ColorBlack is a Color of type Black
	ColorBlack Color = iota
	// ColorWhite is a Color of type White
	ColorWhite
	// ColorRed is a Color of type Red
	ColorRed
	// ColorGreen is a Color of type Green
	ColorGreen Color = iota + 30
	// ColorBlue is a Color of type Blue
	ColorBlue Color = iota + 30
	// ColorGrey is a Color of type Grey
	ColorGrey Color = iota + 30
	// ColorYellow is a Color of type Yellow
	ColorYellow Color = iota + 30
)

func ParseColor

func ParseColor(name string) (Color, error)

ParseColor attempts to convert a string to a Color

func (*Color) MarshalText

func (x *Color) MarshalText() ([]byte, error)

func (Color) String

func (i Color) String() string

func (*Color) UnmarshalText

func (x *Color) UnmarshalText(text []byte) error

type Model

type Model int32

Model x ENUM(Toyota,_,Chevy,_,Ford,_,Tesla,_,Hyundai,_,Nissan,_,Jaguar,_,Audi,_,BMW,_,Mercedes,_,Volkswagon)

const (
	// ModelToyota is a Model of type Toyota
	ModelToyota Model = iota

	// ModelChevy is a Model of type Chevy
	ModelChevy

	// ModelFord is a Model of type Ford
	ModelFord

	// ModelTesla is a Model of type Tesla
	ModelTesla

	// ModelHyundai is a Model of type Hyundai
	ModelHyundai

	// ModelNissan is a Model of type Nissan
	ModelNissan

	// ModelJaguar is a Model of type Jaguar
	ModelJaguar

	// ModelAudi is a Model of type Audi
	ModelAudi

	// ModelBMW is a Model of type BMW
	ModelBMW

	// ModelMercedes is a Model of type Mercedes
	ModelMercedes

	// ModelVolkswagon is a Model of type Volkswagon
	ModelVolkswagon
)

func ParseModel

func ParseModel(name string) (Model, error)

ParseModel attempts to convert a string to a Model

func (*Model) MarshalText

func (x *Model) MarshalText() ([]byte, error)

func (Model) String

func (i Model) String() string

func (*Model) UnmarshalText

func (x *Model) UnmarshalText(text []byte) error

type X

type X struct {
}

X is doc'ed

Jump to

Keyboard shortcuts

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