Documentation ¶
Index ¶
- Variables
- type Scope
- func (s *Scope) CacheDir() (string, error)
- func (s *Scope) ConfigDirs() ([]string, error)
- func (s *Scope) ConfigPath(filename string) (string, error)
- func (s *Scope) DataDirs() ([]string, error)
- func (s *Scope) DataPath(filename string) (string, error)
- func (s *Scope) LogPath(filename string) (string, error)
- func (s *Scope) LookupConfig(filename string) ([]string, error)
- func (s *Scope) LookupDataFile(filename string) ([]string, error)
- type ScopeType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidScope gets returned when an invalid scope type has been set. ErrInvalidScope = errors.New("Invalid scope type") // ErrRetrievingPath gets returned when the path could not be resolved. ErrRetrievingPath = errors.New("Could not retrieve path") )
Functions ¶
This section is empty.
Types ¶
type Scope ¶
Scope holds scope & app-specific information.
func NewCustomHomeScope ¶
NewCustomHomeScope returns a new Scope that lets you operate on a custom path prefix.
func NewVendorScope ¶ added in v0.2.0
NewVendorScope returns a new Scope with vendor information that lets you query app- & platform-specific paths.
func (*Scope) ConfigDirs ¶ added in v0.2.0
ConfigDirs returns a priority-sorted slice of all of the application's config dirs.
func (*Scope) ConfigPath ¶
ConfigPath returns the full path to a file in the application's default config directory.
func (*Scope) DataDirs ¶ added in v0.2.0
DataDirs returns a priority-sorted slice of all the application's data dirs.
func (*Scope) DataPath ¶ added in v0.2.0
DataPath returns the full path to a file in the application's default data directory.
func (*Scope) LookupConfig ¶ added in v0.2.0
LookupConfig returns all existing configs with this filename.
Click to show internal directories.
Click to hide internal directories.