Documentation
¶
Index ¶
- func Args(vs ...any) []any
- func ConvertKey(sentence string) string
- func CutSuffix(s, suffix string) string
- func DescribeStruct(st any) string
- func HasField(v any, name string) bool
- func HelpersFunctions() template.FuncMap
- func MultiLineComment(comment string) string
- func Namify(sentence string) string
- func NamifyWithoutParams(sentence string) string
- func SetConvertKeyFn(name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertKey ¶ added in v0.37.0
ConvertKey is used in template to convert schema property key name according to chosen strategy.
func DescribeStruct ¶
DescribeStruct will describe a struct in a human readable way using `%+v` format from the standard library.
func HelpersFunctions ¶
HelpersFunctions returns the functions that can be used as helpers in a golang template.
func MultiLineComment ¶
MultiLineComment will prefix each line of a comment with "// " in order to make it a valid multiline golang comment.
func NamifyWithoutParams ¶
NamifyWithoutParams will convert a sentence to a golang conventional type name. and will remove all parameters that can appear between '{' and '}'.
func SetConvertKeyFn ¶ added in v0.37.0
SetConvertKeyFn sets the function used to convert schema property key names.
Types ¶
This section is empty.