Documentation ¶
Overview ¶
Package venuelib provides utility functions.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Code ¶
Code returns the error code for `err` if it was produced by Venue. Otherwise, it returns codes.Unknown.
func ErrorDesc ¶
ErrorDesc returns the error description of `err` if it was produced by Venue. Otherwise, it returns err.Error(), or an empty string when `err` is nil.
func Errorf ¶
Errorf returns an error containing an error code and a description. Errorf returns nil if `c` is OK.
func FnName ¶
func FnName() string
FnName returns the calling function name, e.g. "SomeFunction()". This is useful for logging the function name with glog.
Example ¶
if glog.V(3) { glog.Info(FnName()) }
Output:
func FnNameWithArgs ¶
FnNameWithArgs returns the calling function name, with argument values, e.g. "SomeFunction(arg1, arg2)". This is useful for logging function calls with glog.
Types ¶
This section is empty.