example

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeNames added in v0.1.4

func MakeNames() []string

func NoZerosNames added in v0.1.4

func NoZerosNames() []string

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
	// ColorGrey is a Color of type Grey
	ColorGrey
	// ColorYellow is a Color of type Yellow
	ColorYellow
	// ColorBlueGreen is a Color of type Blue-Green
	ColorBlueGreen
	// ColorRedOrange is a Color of type Red-Orange
	ColorRedOrange
)

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 NoZeros added in v0.1.4

type NoZeros int32

Make x ENUM(start=20,middle,end,ps,pps,ppps)

const (
	// NoZerosStart is a NoZeros of type Start
	NoZerosStart NoZeros = iota + 20
	// NoZerosMiddle is a NoZeros of type Middle
	NoZerosMiddle
	// NoZerosEnd is a NoZeros of type End
	NoZerosEnd
	// NoZerosPs is a NoZeros of type Ps
	NoZerosPs
	// NoZerosPps is a NoZeros of type Pps
	NoZerosPps
	// NoZerosPpps is a NoZeros of type Ppps
	NoZerosPpps
)

func ParseNoZeros added in v0.1.4

func ParseNoZeros(name string) (NoZeros, error)

ParseNoZeros attempts to convert a string to a NoZeros

func (*NoZeros) Get added in v0.1.4

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

Get implements the Golang flag.Getter interface func

func (*NoZeros) MarshalText added in v0.1.4

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

func (*NoZeros) Set added in v0.1.4

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

Set implements the Golang flag.Value interface func

func (NoZeros) String added in v0.1.4

func (i NoZeros) String() string

func (*NoZeros) Type added in v0.1.4

func (x *NoZeros) Type() string

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

func (*NoZeros) UnmarshalText added in v0.1.4

func (x *NoZeros) 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