gopath

package
Version: v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotFound = fmt.Errorf("not on GOPATH")

Functions

func Contains

func Contains(dir string) bool

Contains returns true if the given directory is in the GOPATH

func Dir2Import

func Dir2Import(dir string) (string, error)

Dir2Import takes an *absolute* path and returns a golang import path for the package, and returns an error if it isn't on the gopath

func MustDir2Import

func MustDir2Import(dir string) string

MustDir2Import takes an *absolute* path and returns a golang import path for the package, and panics if it isn't on the gopath

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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