config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Endpoint    string `toml:"endpoint"`
	LimitNChars int    `toml:"limit_n_chars"`
}

type Colors

type Colors struct {
	Info   string `toml:"info"`
	State  string `toml:"state"`
	Error  string `toml:"error"`
	Result string `toml:"result"`
}

type Config

type Config struct {
	DefaultSourceCode string
	DefaultSourceName string
	DefaultTargetCode string
	DefaultTargetName string
	APIEndpoint       tran.Endpoint
	APILimitNChars    int
	InfoColor         aec.ANSI
	StateColor        aec.ANSI
	ErrorColor        aec.ANSI
	ResultColor       aec.ANSI
}

func Load

func Load() (*Config, error)

func (*Config) ChangeDefault

func (c *Config) ChangeDefault(source, target string) error

type Default

type Default struct {
	Source string `toml:"source"`
	Target string `toml:"target"`
}

type Toml

type Toml struct {
	Default Default `toml:"default"`
	API     API     `toml:"api"`
	Colors  Colors  `toml:"colors"`
}

Jump to

Keyboard shortcuts

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