enum

package
v0.2.28 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code interface {
	// Code returns the integer number of current code.
	Code() int

	// Description returns the brief description for current code.
	Description() string

	// String returns current code as a string.
	String() string
}

Code is universal code interface definition.

func New

func New(code int, description string) Code

type EnumCode

type EnumCode struct {
	// contains filtered or unexported fields
}

EnumCode is an implementer for interface Code for internal usage only.

func (EnumCode) Code

func (c EnumCode) Code() int

Code returns the integer number of current code.

func (EnumCode) Description

func (c EnumCode) Description() string

Description returns the brief description for current code.

func (EnumCode) String

func (c EnumCode) String() string

String returns current code as a string.

Jump to

Keyboard shortcuts

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