config

package
v0.0.0-...-50af7b8 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

Types

type Config

type Config struct {
	*viper.Viper
	FileData *ConfigFileData
}

func GetConfig

func GetConfig() *Config

func (*Config) GetCurrentContext

func (conf *Config) GetCurrentContext() (Context, error)

func (*Config) SaveFile

func (conf *Config) SaveFile() error

type ConfigFileData

type ConfigFileData struct {
	CurrentContext string             `yaml:"current_context"`
	Contexts       map[string]Context `yaml:"contexts"`
}

type Context

type Context struct {
	Host string `yaml:"host"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳