Documentation ¶
Index ¶
Constants ¶
View Source
const BasePrefix = "//"
Variables ¶
View Source
var ( // ErrNoPrefix gets returned if the given path does not have a prefix. ErrNoPrefix = fmt.Errorf("path does not have a prefix") )
Functions ¶
func ExpandFilepath ¶
ExpandFilepath expands paths with leading //-prefix with the default project path.
Types ¶
type BaseExpander ¶
type BaseExpander struct {
// contains filtered or unexported fields
}
BaseExpander expands based on the given base.
func (*BaseExpander) Base ¶
func (b *BaseExpander) Base() string
Base returns the base path BaseExpander adds.
func (*BaseExpander) Expand ¶
func (b *BaseExpander) Expand(path string) string
Expand replaces BasePrefix at the front with the stored base path.
func (*BaseExpander) ExpandFilepath ¶
func (b *BaseExpander) ExpandFilepath(path string) string
ExpandFilepath replaces BasePrefix at the front with the stored base filepath.
Click to show internal directories.
Click to hide internal directories.