config

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigPaths = []string{

		"/etc/ovh.conf",

		"~/.ovh.conf",

		"./ovh.conf",
	}

	ConfigurableFields = map[string]string{
		"endpoint":              "default",
		"default_cloud_project": "ovh-cli",
	}
)

Functions

func ExpandConfigPaths

func ExpandConfigPaths() []string

configPaths returns configPaths, with ~/ prefix expanded.

func GetConfigValue

func GetConfigValue(cfg *ini.File, sectionName, keyName string) (string, error)

func LoadINI

func LoadINI() (*ini.File, string)

loadINI builds a ini.File from the configuration paths provided in configPaths. It's a helper for loadConfig.

func SetConfigValue

func SetConfigValue(cfg *ini.File, path, sectionName, keyName, value string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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