ability

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbilityStrings

func AbilityStrings() []string

AbilityStrings returns a slice of all String values of the enum

Types

type Ability

type Ability int
const (
	Split Ability = iota
	Burrow
	Resurrection
	Hybrid
	Camouflage
	Attack
)

func AbilityString

func AbilityString(s string) (Ability, error)

AbilityString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func AbilityValues

func AbilityValues() []Ability

AbilityValues returns all values of the enum

func (Ability) IsAAbility

func (i Ability) IsAAbility() bool

IsAAbility returns "true" if the value is listed in the enum definition. "false" otherwise

func (Ability) MarshalJSON

func (i Ability) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for Ability

func (Ability) String

func (i Ability) String() string

func (*Ability) UnmarshalJSON

func (i *Ability) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Ability

Jump to

Keyboard shortcuts

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