datadir

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataDirs []string

DataDirs contains the list of data directories

Functions

func EnsureFirstDataDir

func EnsureFirstDataDir() string

EnsureFirstDataDir retrieves the first data directory. Reports an Error and exits when no data directory can be found.

func EnsureSingleDataDir

func EnsureSingleDataDir() string

EnsureSingleDataDir retrieves the exactly one data directory that exists. Reports and Error and exits when more than one data directories are available.

func GetDataDirs

func GetDataDirs() (dirs []string)

GetDataDirs returns a list of available data directories as strings Reports and Error and exits when no data directories are available.

func MaybeSingleDataDir

func MaybeSingleDataDir() string

MaybeSingleDataDir retrieves the exactly one data directory that exists. Returns empty string "" when than one data directories are available.

func OnDataDirs

func OnDataDirs(action func(dataDir string))

OnDataDirs (...)

func ResolveDataDir

func ResolveDataDir() string

ResolveDataDir determines the data directory to to use. If not specified on cmdline with '-d', look for default in environment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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