config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2018 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DEFAULT_CONFIG_FILE     = ".corgi/corgi_conf.json"
	DEFAULT_SNIPPETS_DIR    = ".corgi/snippets"
	DEFAULT_SNIPPETS_FILE   = ".corgi/snippets.json"
	DEFAULT_EDITOR          = "vim"
	DEFAULT_FILTER_CMD_FZF  = "fzf"
	DEFAULT_FILTER_CMD_PECO = "peco"
)

Variables

View Source
var MissingDefaultFilterCmdError = errors.New("missing default filter cmd")

Functions

func GetDefaultConfigFile

func GetDefaultConfigFile() (string, error)

func GetDefaultEditor

func GetDefaultEditor() (string, error)

func GetDefaultFilterCmd

func GetDefaultFilterCmd() (string, error)

func GetDefaultSnippetsDir

func GetDefaultSnippetsDir() (string, error)

func GetDefaultSnippetsFile

func GetDefaultSnippetsFile() (string, error)

Types

type Config

type Config struct {
	SnippetsFile string `json:"snippets_file"`
	SnippetsDir  string `json:"snippets_dir"`
	Editor       string `json:"editor"`
	FilterCmd    string `json:"filter_cmd"`
}

func Load

func Load() (*Config, error)

func (*Config) IsNew

func (c *Config) IsNew() bool

func (*Config) Save

func (c *Config) Save() error

Jump to

Keyboard shortcuts

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