config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists() bool

func ExpandHome

func ExpandHome(path string) string

func Path

func Path() string

func Save

func Save(cfg *Config) error

Save writes the config to disk with 0600 permissions.

func ValidateDir

func ValidateDir(raw string) (string, error)

ValidateDir expands ~ and checks the path is usable as a download directory.

Types

type Config

type Config struct {
	DownloadDir string       `toml:"download_dir"`
	Itchio      ItchioConfig `toml:"itchio"`
}

func Defaults

func Defaults() *Config

func Load

func Load() (*Config, error)

Load reads the config from disk, returning defaults if no file exists yet.

type ItchioConfig

type ItchioConfig struct {
	APIKey string `toml:"api_key"`
}

Jump to

Keyboard shortcuts

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