Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderOptions ¶
func RenderOptions( packageName, optionsStructName string, fileImports []string, spec *OptionSpec, tagName, varName, funcName, prefix string, withIsset bool, constructorTypeRender string, optionTypeName string, ) ([]byte, error)
RenderOptions will render file and out it's content.
Types ¶
type OptionMeta ¶
type OptionSpec ¶ added in v0.15.0
type OptionSpec struct {
TypeParamsSpec string // [KeyT int | string, TT any]
TypeParams string // [KeyT, TT]
Options []OptionMeta
}
func GetOptionSpec ¶
func GetOptionSpec(filePath, optStructName, tagName string, allVariadic bool) (*OptionSpec, []string, []string, error)
GetOptionSpec read the input filename by filePath, find optionsStructName and scan for options.
func (OptionSpec) HasValidation ¶ added in v0.15.0
func (s OptionSpec) HasValidation() bool
Click to show internal directories.
Click to hide internal directories.