config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultConfigDir

func GetDefaultConfigDir() (dir string, err error)

Types

type AliOSSConfig

type AliOSSConfig struct {
	AccessID   string `toml:"access_id"`
	AccessKey  string `toml:"access_key"`
	BucketName string `toml:"bucket_name"`
	Endpoint   string `toml:"endpoint"`
	AutoSync   bool   `toml:"auto_sync"`
}

type Config

type Config struct {
	General GeneralConfig
	AliOSS  AliOSSConfig
}

Config is a struct of config

var Conf Config

Conf is global config variable

func (*Config) Load

func (cfg *Config) Load(file string) error

func (*Config) Switch

func (cfg *Config) Switch(snippetFile string) error

type FlagConfig

type FlagConfig struct {
	Debug     bool
	Query     string
	Delimiter string
	Force     bool
	OneLine   bool
	Color     bool
	Tag       bool
}

FlagConfig is a struct of flag

var Flag FlagConfig

Flag is global flag variable

type GeneralConfig

type GeneralConfig struct {
	SnippetFile string `toml:"snippetfile"`
	Editor      string `toml:"editor"`
	Column      int    `toml:"column"`
	SelectCmd   string `toml:"selectcmd"`
}

Jump to

Keyboard shortcuts

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