cfg

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CONFIG_DIR_V1 = "~/.wtf/"
View Source
const CONFIG_DIR_V2 = "~/.config/wtf/"

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() (string, error)

ConfigDir returns the absolute path to the configuration directory

func Copy added in v0.0.10

func Copy(src, dest string) error

Copy copies src to dest, doesn't matter if src is a directory or a file

func CreateConfigDir

func CreateConfigDir()

CreateConfigDir creates the wtf/ directory in the user's home dir

func CreateConfigFile added in v0.0.9

func CreateConfigFile()

CreateConfigFile creates a simple config file in the config directory if one does not already exist

func CreateFile

func CreateFile(fileName string) (string, error)

CreateFile creates the named file in the config directory, if it does not already exist. If the file exists it does not recreate it. If successful, eturns the absolute path to the file If unsuccessful, returns an error

func LoadConfigFile

func LoadConfigFile(filePath string) *config.Config

LoadConfigFile loads the config.yml file to configure the app

func MigrateOldConfig added in v0.0.10

func MigrateOldConfig()

MigrateOldConfig copies any existing configuration from the old location to the new, XDG-compatible location

Types

This section is empty.

Jump to

Keyboard shortcuts

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