namedstruct

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotExist     = errors.New(`the struct not exist`)
	ErrNameConflict = errors.New(`name conflict! failed to register, this name is already registered`)
)

Functions

func ConvertToSlice

func ConvertToSlice(recv interface{}) []interface{}

Types

type Structs

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

func NewStructs

func NewStructs() *Structs

func (*Structs) GetType

func (s *Structs) GetType(name string) (reflect.Type, bool)

func (*Structs) Make

func (s *Structs) Make(name string) interface{}

func (*Structs) MakeSlice

func (s *Structs) MakeSlice(name string) interface{}

func (*Structs) Register

func (s *Structs) Register(name string, v interface{})

Jump to

Keyboard shortcuts

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