Documentation ¶
Index ¶
- Variables
- func BasicLitValue(basic interface{}) string
- func CheckCallExprParam(call *dst.CallExpr, p string) ([]string, bool)
- func CheckSelectorExpr(stmt interface{}, expr string) bool
- func GetCallExprByVarName(stmt interface{}, varName string) (*dst.CallExpr, error)
- func GetFormTag(str string) string
- func GetFuncParamByType(decl *dst.FuncDecl, argType string) []string
- func GetFuncParamList(decl *dst.FuncDecl) (ps []string)
- func GetFuncParams(decl *dst.FuncDecl) map[string]string
- func GetFuncVars(decl *dst.FuncDecl) map[string]string
- func GetJsonTag(str string) string
- func GetTagBindingRequired(str string) bool
- func GetVars(stmt interface{}) map[string]string
- func SnakeCase(s string) string
- func ToStr(stmt interface{}) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFind = errors.New("not found")
Functions ¶
func BasicLitValue ¶
func BasicLitValue(basic interface{}) string
func CheckSelectorExpr ¶
CheckSelectorExpr check stmt has SelectorExpr
func GetCallExprByVarName ¶
GetCallExprByVarName get CallExpr from stmt by var name
func GetFormTag ¶
func GetFuncParamByType ¶
GetFuncParamByType get param name of function by type func Test(a, b string) : string is type , a and b is name
func GetFuncParamList ¶
GetFuncParamList get param name of function func Test(a, b string) -> ["a","b"]
func GetFuncParams ¶
GetFuncParams get params of function, return map[name]type func Test(a, b string) -> {"a":"string","b":"string")
func GetJsonTag ¶
func GetTagBindingRequired ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.