package
Version:
v1.9.6
Opens a new window with list of versions in this module.
Published: Jun 22, 2023
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
AsString returns a pre-formatted string from the caller.Get() function using the following format: `fileName#lineNumber`, eg.
// /path/to/calling_file.go#22
fmt.Println(caller.AsString())
Get returns the calling location (file and line number) if found, eg.
if file, line, ok := caller.Get(); ok {
// /path/to/calling_file.go 11
fmt.Println(file, line)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.