Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StructToMap ¶
func StructToMap(value interface{}) map[string]interface{}
StructToMap shallow convert struct to map, using field name as key, field value as map value. The Field name can be overridden using 'name' struct tag.
Note: only exported fields are set into map.
Types ¶
type CallerInfo ¶
type CallerInfo struct { Package string // Package Name File string // File Name Function string // Function Name LineNo int // Line number }
CallerInfo is caller info
func GetCaller ¶
func GetCaller(depth int) *CallerInfo
GetCaller return the caller info, param depth indicate the stack depth to the caller; for direct caller, depth is 1
Click to show internal directories.
Click to hide internal directories.