Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortValues ¶
SortValues is a sort function that handles both native types and any type that can be converted to error or Stringer. Other inputs are sorted according to their Value.String() value to ensure display stability.
Types ¶
type GenGo ¶
type GenGo struct { Statics *[]string Runtime *[]string Generated map[interface{}]interface{} // key{reflect.Value} => map{string} that is the generated name of the var; else key{name} => map{obj} TypeToStringFn func(string) string // Convert stringize reflect.Type to how generate code will refer to it KeySortFn func(keys []reflect.Value) FieldSortFn func(members []string) WhereFn func() string StructHookFn func(target string, t reflect.Type, obj interface{}) (res string, deferredFunc func(target string, obj interface{})) ValueHookFn func(target string, t reflect.Type, v reflect.Value) string // return non-empty string to short-circuit value expansion PointerHookFn func(target string, ptr, v reflect.Value) string // return non-empty string to short-circuit value expansion PtrToValueFn func(ptr, v reflect.Value) string // typically calls (*GenGo)Var() to generate the variable and returns that result }
Click to show internal directories.
Click to hide internal directories.