config

package module
v0.0.0-...-77947eb Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

README

Go config

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSystemConfigurationPath

func GetSystemConfigurationPath() string

func GetUserConfigurationPath

func GetUserConfigurationPath() string

func LoadConfigurationFile

func LoadConfigurationFile(foldername string, filename string) error

func MergeYaml

func MergeYaml(b []byte) error

func MergeYamlFile

func MergeYamlFile(path string) error

func SaveYamlAsSystemConfiguration

func SaveYamlAsSystemConfiguration(foldername string, filename string, config interface{}) error

func SaveYamlAsUserConfiguration

func SaveYamlAsUserConfiguration(foldername string, filename string, config interface{}) error

func Unmarshal

func Unmarshal(Item interface{}) error

func UnmarshalYaml

func UnmarshalYaml(b []byte) error

func UnmarshalYamlFile

func UnmarshalYamlFile(path string) error

Types

type Config

type Config struct {
	Item map[string]interface{}
}

func New

func New() *Config

func (*Config) ConfigurationFileExists

func (c *Config) ConfigurationFileExists(foldername string, filename string) bool

func (*Config) LoadConfigurationFile

func (c *Config) LoadConfigurationFile(foldername string, filename string) error

func (*Config) MergeYaml

func (c *Config) MergeYaml(b []byte) error

func (*Config) MergeYamlFile

func (c *Config) MergeYamlFile(path string) error

func (*Config) SaveYamlAsSystemConfiguration

func (c *Config) SaveYamlAsSystemConfiguration(foldername string, filename string, config interface{}) error

func (*Config) SaveYamlAsUserConfiguration

func (c *Config) SaveYamlAsUserConfiguration(foldername string, filename string, config interface{}) error

func (*Config) Unmarshal

func (c *Config) Unmarshal(Item interface{}) error

func (*Config) UnmarshalYaml

func (c *Config) UnmarshalYaml(b []byte) error

func (*Config) UnmarshalYamlFile

func (c *Config) UnmarshalYamlFile(path string) error

Jump to

Keyboard shortcuts

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