Documentation ¶
Overview ¶
package paths to filesystem directories and vice versa.
Index ¶
- func Dir(env vos.Env, packagePath string) (string, error)
- func Dirs(env vos.Env, packagePath string) (map[string]string, error)
- func Name(env vos.Env, packagePath string, srcDir string) (string, error)
- func Path(env vos.Env, packageDir string) (string, error)
- type Cache
- func (c *Cache) Dir(ppath string) (string, error)
- func (c *Cache) Dirs(ppath string) (map[string]string, error)
- func (c *Cache) FilePath(gpath string) (string, error)
- func (c *Cache) GoName(fpath string) (string, error)
- func (c *Cache) Name(packagePath, srcDir string) (string, error)
- func (c *Cache) Path(dir string) (string, error)
- type ExcludeType
- type PackageSpec
- type Setup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dir ¶
Dir returns the filesystem path for the directory corresponding to the go package path provided.
func Dirs ¶
Dirs returns the filesystem path for all packages under the directory corresponding to the go package path provided.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache supports patsy.Dir and patsy.Path, but cached so they can be used in tight loops without hammering the filesystem.
func (*Cache) FilePath ¶
FilePath converts a package path and filename to a full filepath:
github.com/dave/foo.go -> /Users/dave/go/src/github.com/dave/foo.go
func (*Cache) GoName ¶
GoName converts a full filepath to a package path and filename:
/Users/dave/go/src/github.com/dave/foo.go -> github.com/dave/foo.go
type ExcludeType ¶ added in v1.9.0
type ExcludeType byte
const ( Notestall ExcludeType = iota Notest Notestdept )
type PackageSpec ¶
PackageSpec identifies a package by dir and path
Directories ¶
Path | Synopsis |
---|---|
package builder can be used in testing to create a temporary go module or gopath, src, namespace and package directory, and populate it with source files.
|
package builder can be used in testing to create a temporary go module or gopath, src, namespace and package directory, and populate it with source files. |
Package vos is a virtual os tool.
|
Package vos is a virtual os tool. |
Click to show internal directories.
Click to hide internal directories.