Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VersionedBuildString ¶
VersionedBuildString ...
Types ¶
type CallerTree ¶ added in v0.4.0
type CallerTree struct {
DotPath string
DotDotPath string
DotDotDotPath string
DotDotDotDotPath string
}
CallerTree returns data that precomputes paths for convenience
func CallerPaths ¶ added in v0.4.0
func CallerPaths(pc uintptr, file string, line int, ok bool) *CallerTree
CallerPaths takes as input the results from calling runtime.Caller(0) and returns a data structure of current caller's path and a set of parent paths. In a Golang-standard project directory for this project, the following would be true:
paths := CallerPaths(pc, file, line, ok) strings.HasSuffix(paths.DotPath, "/github.com/bluest-eel/common/util") strings.HasSuffix(paths.DotDotPath, "/github.com/bluest-eel/common") strings.HasSuffix(paths.DotDotDotPath, "/github.com/bluest-eel") strings.HasSuffix(paths.DotDotDotDotPath, "/github.com")
Click to show internal directories.
Click to hide internal directories.