config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigFileName = "config.json"

Variables

View Source
var (
	DefaultConfigDir      = os.ExpandEnv("$HOME/.config/savvy")
	DefaultConfigFilePath = filepath.Join(DefaultConfigDir, DefaultConfigFileName)
)
View Source
var ErrMissingToken = errors.New("missing or empty token")

Functions

func APIHost

func APIHost() string

func Version added in v0.0.9

func Version() string

Types

type Config

type Config struct {
	Token string `json:"token"`
}

func LoadFromFile

func LoadFromFile() (*Config, error)

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