Documentation
¶
Index ¶
- type Info
- 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
- type Path
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
Info represents details about the directory/package
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) MarshalJSON ¶
func (Info) ModuleName ¶
ModuleName returns the name of the current module, or if not using modules, the current package. These *might* not match.
type Module ¶
func (Module) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.