example

package
Version: v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2018 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 blue-green red-orange )

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
	// ColorBlueGreen is a Color of type Blue-Green
	ColorBlueGreen Color = iota + 30
	// ColorRedOrange is a Color of type Red-Orange
	ColorRedOrange 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 Make added in v0.1.3

type Make int32

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

const (
	// MakeToyota is a Make of type Toyota
	MakeToyota Make = iota

	// MakeChevy is a Make of type Chevy
	MakeChevy

	// MakeFord is a Make of type Ford
	MakeFord

	// MakeTesla is a Make of type Tesla
	MakeTesla

	// MakeHyundai is a Make of type Hyundai
	MakeHyundai

	// MakeNissan is a Make of type Nissan
	MakeNissan

	// MakeJaguar is a Make of type Jaguar
	MakeJaguar

	// MakeAudi is a Make of type Audi
	MakeAudi

	// MakeBMW is a Make of type BMW
	MakeBMW

	// MakeMercedesBenz is a Make of type Mercedes-Benz
	MakeMercedesBenz

	// MakeVolkswagon is a Make of type Volkswagon
	MakeVolkswagon
)

func ParseMake added in v0.1.3

func ParseMake(name string) (Make, error)

ParseMake attempts to convert a string to a Make

func (*Make) Get added in v0.1.3

func (x *Make) Get() interface{}

Get implements the Golang flag.Getter interface func

func (*Make) MarshalText added in v0.1.3

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

func (*Make) Set added in v0.1.3

func (x *Make) Set(val string) error

Set implements the Golang flag.Value interface func

func (Make) String added in v0.1.3

func (i Make) String() string

func (*Make) Type added in v0.1.3

func (x *Make) Type() string

Type implements the github.com/spf13/pFlag Value interface

func (*Make) UnmarshalText added in v0.1.3

func (x *Make) 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
t or T : Toggle theme light dark auto
y or Y : Canonical URL