package src
import "github.com/mmcloughlin/avo/src"
Package src provides types for working with source files.
Index ¶
Examples ¶
Types ¶
type Position ¶
Position represents a position in a source file.
func FramePosition ¶
FramePosition returns the Position of the given stack frame.
func (Position) IsValid ¶
IsValid reports whether the position is valid: Line must be positive, but Filename may be empty.
func (Position) Rel ¶
Rel returns Position relative to basepath. If the given filename cannot be expressed relative to basepath the position will be returned unchanged.
func (Position) Relwd ¶
Relwd returns Position relative to the current working directory. Returns p unchanged if the working directory cannot be determined, or the filename cannot be expressed relative to the working directory.
func (Position) String ¶
String represents Position as a string.
Source Files ¶
- Version
- v0.6.0 (latest)
- Published
- Jan 7, 2024
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 4 weeks ago –
Tools for package owners.