Documentation ¶
Index ¶
- func BuildString(version *Version) string
- func GOBDecode(b []byte, result interface{}) error
- func GOBEncode(v interface{}) ([]byte, error)
- func GetBuildTime(version *Version) *time.Time
- func VersionString(version *Version) string
- func VersionedBuildString(version *Version) string
- type CallerTree
- type Version
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.