config

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MPL-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDataString added in v1.4.0

func DeleteDataString(relPath string) error

DeleteDataString deletes a file in the data home directory

func GetValue

func GetValue(key string) (string, error)

GetValue reads the value of a config key from the config file

func ReadDataString added in v1.4.0

func ReadDataString(relPath string) (string, error)

ReadDataString reads a string from a file in the data home directory

func SaveDataString added in v1.4.0

func SaveDataString(relPath string, data string) error

SaveDataString saves a string to a file in the data home directory

func SetConfigHome added in v1.4.0

func SetConfigHome(configDir string) error

SetConfigHome sets the configuration home directory - useful for testing

func SetDataHome added in v1.4.0

func SetDataHome(dataHome string) error

SetDataHome sets the data home directory - useful for testing

func SetValue

func SetValue(key, val string) error

SetValue updates the value of a config key in the config file

func UnsetConfigHome added in v1.4.0

func UnsetConfigHome() error

UnsetConfigHome unsets the configuration home directory returning to the default value

func UnsetDataHome added in v1.4.0

func UnsetDataHome() error

UnsetDataHome unsets the data home directory returning to the default value

func UnsetValue

func UnsetValue(key string) error

UnsetValue removes the value of a config key from the config file

Types

This section is empty.

Jump to

Keyboard shortcuts

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