configpaths

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigCandidatePaths

func ConfigCandidatePaths(userPath string) (jsonPaths, yamlPaths, tomlPaths []string)

ConfigCandidatePaths builds candidate paths for config files per format. If userPath is provided, it is prioritized and routed to the matching loader by extension.

func DefaultConfigDir

func DefaultConfigDir() (string, error)

DefaultConfigDir returns the platform-specific configuration directory for VIIPER.

func DefaultConfigPath

func DefaultConfigPath(format string) (string, error)

DefaultConfigPath returns the default config file path for the given format using base name "config".

func DefaultNamedConfigPath

func DefaultNamedConfigPath(baseName, format string) (string, error)

DefaultNamedConfigPath returns the default config file path for the given format and base name (e.g., "server").

func EnsureDir

func EnsureDir(filePath string) error

EnsureDir ensures the directory for a given file path exists.

func KeyFileDir added in v0.4.1

func KeyFileDir() (string, error)

KeyFileDir returns the directory where the API key file should be stored. On Unix, root services use /etc/viiper.

Types

This section is empty.

Jump to

Keyboard shortcuts

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