appdir

package
v1.15.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package appdir implements a customized lookup pattern for application paths like config, cache and data dirs. On Linux this uses the XDG specification, on MacOS and Windows the platform defaults.

Index

Constants

This section is empty.

Variables

View Source
var DefaultAppdir = New("gopass")

Functions

func UserCache

func UserCache() string

UserCache returns the users cache dir.

func UserConfig

func UserConfig() string

UserConfig returns the users config dir.

func UserData

func UserData() string

UserData returns the users data dir.

func UserHome

func UserHome() string

UserHome returns the users home dir.

Types

type Appdir added in v1.15.13

type Appdir struct {
	// contains filtered or unexported fields
}

Appdir is a helper struct to generate paths for config, cache and data dirs.

func New added in v1.15.13

func New(name string) *Appdir

New returns a new Appdir.

func (*Appdir) Name added in v1.15.13

func (a *Appdir) Name() string

Name returns the name of the appdir.

func (*Appdir) UserCache added in v1.15.13

func (a *Appdir) UserCache() string

UserCache returns the users cache dir.

func (*Appdir) UserConfig added in v1.15.13

func (a *Appdir) UserConfig() string

UserConfig returns the users config dir.

func (*Appdir) UserData added in v1.15.13

func (a *Appdir) UserData() string

UserData returns the users data dir.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL