example

package
v0.0.0-...-519d24f Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Code generated by github.com/yssk22/go/generator DO NOT EDIT.

Index

Constants

View Source
const MyEnumE, MyEnumF = MyEnum(13), MyEnum(14)
View Source
const NotMyEnumZ = 1

Variables

View Source
var NotMyEnumX, NotMyEnumY = MyEnum(100), MyEnum(123)

Functions

This section is empty.

Types

type MyEnum

type MyEnum int

MyEnum is an example of enum @enum

const (
	MyEnumA MyEnum = iota
	MyEnumB
)
const MyEnumC, MyEnumD MyEnum = 11, 12

func MustParseMyEnum

func MustParseMyEnum(s string) MyEnum

func ParseMyEnum

func ParseMyEnum(s string) (MyEnum, error)

func ParseMyEnumOr

func ParseMyEnumOr(s string, or MyEnum) MyEnum

func (MyEnum) IsVaild

func (e MyEnum) IsVaild() bool

func (MyEnum) MarshalJSON

func (e MyEnum) MarshalJSON() ([]byte, error)

func (*MyEnum) Parse

func (e *MyEnum) Parse(s string) error

func (MyEnum) String

func (e MyEnum) String() string

func (*MyEnum) UnmarshalJSON

func (e *MyEnum) UnmarshalJSON(b []byte) error

type YourEnum

type YourEnum int

@enum

const (
	YourEnumA YourEnum = iota
	YourEnumB
)

func MustParseYourEnum

func MustParseYourEnum(s string) YourEnum

func ParseYourEnum

func ParseYourEnum(s string) (YourEnum, error)

func ParseYourEnumOr

func ParseYourEnumOr(s string, or YourEnum) YourEnum

func (YourEnum) IsVaild

func (e YourEnum) IsVaild() bool

func (YourEnum) MarshalJSON

func (e YourEnum) MarshalJSON() ([]byte, error)

func (*YourEnum) Parse

func (e *YourEnum) Parse(s string) error

func (YourEnum) String

func (e YourEnum) String() string

func (*YourEnum) UnmarshalJSON

func (e *YourEnum) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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