lib

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareConfigList

func CompareConfigList(src, dst []*Config) ([]*Config, []*Config)

CompareConfigList compares two config lists and returns the differences between them

func ConfigsToMap

func ConfigsToMap(configs []*Config) map[string]string

ConfigsToMap converts config list to map

func SaveAsYAML

func SaveAsYAML(configs []*Config, filename string) error

SaveAsYAML saves configs to local config file

Types

type Config

type Config struct {
	Key   string `yaml:"key"`
	Value string `yaml:"value"`
}

Config represents key=value pair

func LoadConfigYAML

func LoadConfigYAML(filename string) ([]*Config, error)

LoadConfigYAML loads configs from the given YAML file

func MapToConfigs

func MapToConfigs(configMap map[string]string) []*Config

MapToConfigs converts map to config list

Jump to

Keyboard shortcuts

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