config

package
v0.0.74 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(configfilepath string) error

Setup asks user for input

func UserHomeDir

func UserHomeDir() string

UserHomeDir

Types

type Config

type Config struct {
	Provider             string            `json:"provider"`
	ProviderSettings     map[string]string `json:"providersettings"`
	Path                 string
	URLShortenerProvider string
	URLShortenerSettings map[string]string
}

Config File Structure

func LoadConfig

func LoadConfig(path string) (Config, error)

LoadConfig from disk

func LookupConfig

func LookupConfig(configfilepath string) (Config, error)

LookupConfig search config and load it

func (Config) Write

func (c Config) Write() error

Write config to disk

Jump to

Keyboard shortcuts

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