load

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(source interface{}, opt *Option) error

Types

type Extractor

type Extractor interface {
	Name() string
	Extract(args []string) (string, error)
}

type Option

type Option struct {
	TagName      string
	Extractors   map[string]Extractor
	Transformers map[string]Transformer
}

type Tag

type Tag struct {

	// ;
	Required bool
	Default  string
	// contains filtered or unexported fields
}

func ParseTag

func ParseTag(tag string) (*Tag, error)

type Transformer

type Transformer interface {
	Name() string
	Transform(data string, args []string, typ reflect.Type) (interface{}, error)
}

Jump to

Keyboard shortcuts

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