paths

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package paths unifies typical configuration paths for different operating systems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasePath

func BasePath() string

BasePath is the basepath to create program-specific folders and dotfiles under.

func ConfigName

func ConfigName() string

ConfigName returns the full path to the current program's configuration file. Generate the name with SetJSONNConfig() or SetINIConfig().

func ConfigPath

func ConfigPath() string

ConfigPath is the basepath for the currentøy running app, generated via SetConfigPath(). If called before SetConfigPath(), the path will be built from the name of the running program.

func SetConfigPath

func SetConfigPath(program string) string

SetConfigPath builds the full path for configuration files and returns it.

func SetINIConfig

func SetINIConfig() string

SetINIConfig sets the file name for the program's main configuration file, ending in .ini.

func SetJSONConfig

func SetJSONConfig() string

SetJSONConfig sets the file name for the program's main configuration file, ending in .json.

Types

This section is empty.

Jump to

Keyboard shortcuts

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