config

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDataString

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

func ReadDataString(relPath string) (string, error)

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

func SaveDataString

func SaveDataString(relPath string, data string) error

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

func SetConfigHome

func SetConfigHome(configDir string) error

SetConfigHome sets the configuration home directory - useful for testing

func SetDataHome

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

func UnsetConfigHome() error

UnsetConfigHome unsets the configuration home directory returning to the default value

func UnsetDataHome

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