Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFileImports ¶
GetFileImports read the file and parse the imports section. Return all found imports with aliases.
func RenderOptions ¶
func RenderOptions( packageName, optionsStructName string, fileImports []string, spec *OptionSpec, tagName, varName, funcName, prefix string, withIsset bool, ) ([]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, optionsStructName, tagName string) (*OptionSpec, []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.