parser

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldInfo

type FieldInfo struct {
	Name       string
	Type       reflect.Type
	Tag        *TagSpec
	Index      []int
	IsEmbedded bool
	FieldName  string
}

type StructInfo

type StructInfo struct {
	Fields []FieldInfo
}

func ParseStruct

func ParseStruct(t reflect.Type) (*StructInfo, error)

type TagSpec

type TagSpec struct {
	EnvVar     string
	FileKey    string
	Default    string
	Required   bool
	Prefix     string
	Separator  string
	Format     string
	Validators []Validator
}

func ParseTag

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

type Validator

type Validator struct {
	Name   string
	Params []string
}

Jump to

Keyboard shortcuts

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