clivar

package
v0.0.55 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagCliExample             = "NAME[description key]:valueType=defaultValue"
	CountPartsTagData         = 2
	CountPartsNameType        = 2
	CountPartsNameDescription = 2
)

Variables

This section is empty.

Functions

func Load

func Load(structData interface{}) error

func NewTagProcessor

func NewTagProcessor() refavour.TagProcessor

Types

type CliVar

type CliVar struct {
	Key          string
	Description  string
	DefaultValue interface{}
}

func (*CliVar) GetBool

func (cli *CliVar) GetBool() *bool

func (*CliVar) GetFloat64

func (cli *CliVar) GetFloat64() *float64

func (*CliVar) GetInt

func (cli *CliVar) GetInt() *int

func (*CliVar) GetString

func (cli *CliVar) GetString() *string

type FieldInfo added in v0.0.47

type FieldInfo struct {
	Type         reflect.Type
	Name         string
	ValueType    string
	DefaultValue string
	Description  string
}

type TagInfo added in v0.0.47

type TagInfo struct {
	Tag string
}

func (*TagInfo) GetFieldInfo added in v0.0.47

func (tag *TagInfo) GetFieldInfo(typeField reflect.StructField, valueField reflect.Value) (interface{}, error)

type UnknownValueTypeError added in v0.0.20

type UnknownValueTypeError struct {
	ValueType string
}

Ошибка - Неизвестный тип значения --------------------------------------------------

func (*UnknownValueTypeError) Error added in v0.0.20

func (e *UnknownValueTypeError) Error() string

Jump to

Keyboard shortcuts

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