Documentation ¶
Index ¶
Constants ¶
const DriverGoErrorPrefix = "driver-go"
Variables ¶
This section is empty.
Functions ¶
func ErrorfWithCaller ¶
ErrorfWithCaller returns a formatted error with the caller function as prefix e.g. driver-go(callerFunctionName): format To prevent the error from chaining and becoming too long: If format starts with "driver-go: ", remove "driver-go: " prefix from format If format starts with "driver-go(someFuncName):", remove "driver-go" prefix from format
func GetCallerFunctionName ¶
GetCallerFunctionName gets the name of the calling function skip is the number of levels up from this function e.g. GetCallerFunctionName is called in main.Test() which in called in main.Main if skip == 1 -> main.Test is returned if skip == 2 -> main.Main is returned
func GetFunctionName ¶
func GetFunctionName(i interface{}) string
GetFunctionName returns the name of the function `i`. Should be passed a function value.
Types ¶
This section is empty.