config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(conf Config, name string, valueA interface{}) error

Set sets the given option on the given configuration file.

func SetIfNot

func SetIfNot(conf Config, name string, value, not interface{}) (bool, error)

SetIfNot sets the given option on the given configuration file if and only if it is not equal to the last parameter.

func UpdateFromFile

func UpdateFromFile(conf Config, path string) error

UpdateFromFile automatically reads a file and updates the configuration object from its contents.

func UpdateFromReader

func UpdateFromReader(conf Config, reader io.Reader) error

UpdateFromReader takes a reader and updates the configuration object from its contents.

func UpdateFromString

func UpdateFromString(conf Config, confOption string) error

UpdateFromString updates the given config from the single-line configuration string.

Types

type Config

type Config interface {
}

Config is an interface representing a configuration file

Jump to

Keyboard shortcuts

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