package here
import "github.com/markbates/pkger/here"
Index ¶
- type Info
- func Cache(p string, fn func(string) (Info, error)) (Info, error)
- func Current() (Info, error)
- func Dir(p string) (Info, error)
- func Package(p string) (Info, error)
- func (i Info) FilePath(paths ...string) string
- func (i Info) IsZero() bool
- func (fi Info) MarshalJSON() ([]byte, error)
- func (i Info) Mods() bool
- func (i Info) ModuleName() string
- func (i Info) Open(p string) (*os.File, error)
- func (i Info) Parse(p string) (Path, error)
- func (i Info) String() string
- type Module
- func (i Module) IsZero() bool
- func (m Module) MarshalJSON() ([]byte, error)
- func (i Module) String() string
- type Path
Types ¶
type Info ¶
Info represents details about the directory/package
func Cache ¶
func Current ¶
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) FilePath ¶
func (Info) IsZero ¶
IsZero checks if the type has been filled with rich chocolately data goodness
func (Info) MarshalJSON ¶
func (Info) Mods ¶
Mods returns whether Go modules are used in this directory/package.
func (Info) ModuleName ¶
ModuleName returns the name of the current module, or if not using modules, the current package. These *might* not match.
func (Info) Open ¶
func (Info) Parse ¶
func (Info) String ¶
type Module ¶
func (Module) IsZero ¶
func (Module) MarshalJSON ¶
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
- v0.6.0
- Published
- Oct 23, 2019
- Platform
- js/wasm
- Imports
- 13 packages
- Last checked
- 7 hours ago –
Tools for package owners.