gopath

package
v1.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TrimPrefix

func TrimPrefix(absolutePath string) string

TrimPrefix trims everything up to the first /src/ as a heuristic for limiting the file to the go import path. This is a very simple heuristic that will break if the GOPATH exists in a directory with /src/ in the path (e.g. ~/src/go/src/github...), but is considered best-effort.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL