conf

package
v0.0.0-...-bc9812a Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(c *Conf) error

func Save

func Save(c *Conf) error

func WriteYamlConf

func WriteYamlConf(path string, c *Conf) error

Types

type Conf

type Conf struct {
	Save, Init    bool "-"
	SlackToken    string
	Message       string "-"
	SlackChannels []string
}

func Load

func Load() (*Conf, error)

Load conf from various sources and determine current settings

func ReadFlagConfig

func ReadFlagConfig() (conf *Conf, err error)

func ReadYamlConf

func ReadYamlConf(path string) (*Conf, error)

func (Conf) Merge

func (conf Conf) Merge(c2 *Conf) *Conf

Merge two confs(without mutating) taking any existing vales from passed in Conf

func (*Conf) Valid

func (c *Conf) Valid() (errs []error)

Validate conf

Jump to

Keyboard shortcuts

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