Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetLocationer ¶
type GetLocationer interface {
GetLocation() Location
}
GetLocationer is the interface that wraps the basic GetLocation method.
type Location ¶
type Location struct { File string // File name Func string // Function name Line int // Line number inside file Inside string // Inside is used when Location is inside something else BehindCmp bool // BehindCmp is true when operator is behind a Cmp* function }
Location records a place in a source file.
func New ¶
New returns a new Location. callDepth is the number of stack frames to ascend to get the calling function (Func field), added to 1 to get the File & Line fields.
If the location can not be determined, ok is false and location is not valid.
func (Location) IsInitialized ¶
IsInitialized returns true if l is initialized (e.g. [NewLocation] called without an error), false otherwise.
Click to show internal directories.
Click to hide internal directories.