package here
import "github.com/gobuffalo/here"
Index ¶
- Variables
- type Here
- func New() Here
- func (h Here) Current() (Info, error)
- func (h Here) Dir(p string) (Info, error)
- func (h Here) Package(p string) (Info, error)
- type Info
- func Current() (Info, error)
- func Dir(p string) (Info, error)
- func Package(p string) (Info, error)
- func (i Info) IsZero() bool
- func (i Info) Parse(p string) (Path, error)
- func (i Info) String() string
- type Module
- type Path
Variables ¶
var Version = "development"
Version of here
Types ¶
type Here ¶
type Here struct {
// contains filtered or unexported fields
}
func New ¶
func New() Here
New returns a Here type that will cache all results. This speeds up repeated calls, and can be useful for testing.
func (Here) Current ¶
Current returns the Info representing the current Go module
func (Here) Dir ¶
Dir attempts to gather info for the requested directory.
func (Here) Package ¶
Package attempts to gather info for the requested package.
From the `go help list` docs:
The -find flag causes list to identify the named packages but not resolve their dependencies: the Imports and Deps lists will be empty.
A workaround for this issue is to use the `Dir` field in the returned `Info` value and pass it to the `Dir(string) (Info, error)` function to return the complete data.
type Info ¶
type Info struct {
Dir string
ImportPath string
Name string
Doc string
Target string
Root string
Match []string
Stale bool
StaleReason string
GoFiles []string
Imports []string
Deps []string
TestGoFiles []string
TestImports []string
Module Module
}
Info represents details about the directory/package
func Current ¶
Current returns the Info representing the current Go module
func Dir ¶
Dir attempts to gather info for the requested directory.
func Package ¶
Package attempts to gather info for the requested package.
From the `go help list` docs:
The -find flag causes list to identify the named packages but not resolve their dependencies: the Imports and Deps lists will be empty.
A workaround for this issue is to use the `Dir` field in the returned `Info` value and pass it to the `Dir(string) (Info, error)` function to return the complete data.
func (Info) IsZero ¶
IsZero checks if the type has been filled with rich chocolately data goodness
func (Info) Parse ¶
func (Info) String ¶
type Module ¶
func (Module) IsZero ¶
func (Module) String ¶
type Path ¶
func (Path) String ¶
Source Files ¶
current.go dir.go here.go info.go info_map.go module.go parse.go path.go pkg.go version.go
Directories ¶
| Path | Synopsis |
|---|---|
| cmd | |
| cmd/here | |
| there |
- Version
- v0.6.1
- Published
- Apr 15, 2020
- Platform
- windows/amd64
- Imports
- 9 packages
- Last checked
- 11 months ago –
Tools for package owners.