config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName    = "fortunate"
	GUIAppName = "Fortunate"
	Version    = "1.1.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DisplayVersion bool     `json:"-"`
	IconTheme      string   `json:"iconTheme"`
	FortuneTimer   int      `json:"fortuneTimer,string"`
	ShortFortunes  bool     `json:"shortFortunes,string"`
	LongFortunes   bool     `json:"longFortunes,string"`
	ShowCookie     bool     `json:"showCookie,string"`
	FortuneLists   []string `json:"fortuneLists"`
}

Config type for application configuration.

var AppConfig Config

AppConfig stores the app configuration.

func (*Config) Load

func (c *Config) Load() error

Load reads the configuration from ~/.config/fortunate/config and loads it into the Config struct. The config is in UCL format.

func (*Config) Save

func (c *Config) Save() error

Save saves the configuration to ~/.config/fortunate/config.

Jump to

Keyboard shortcuts

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