config

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CONFIG_PATH string
View Source
var Cfg = Config{}

Functions

func GenerateDefaultConfig

func GenerateDefaultConfig() (string, error)

func InitConfig

func InitConfig() error

Types

type Config

type Config struct {
	// FIXME (k): <2025-06-12 01:08>
	Debug bool `default:"false" toml:"debug"`

	// Modules      []string
	EnableEmoji  bool   `default:"true" toml:"enable_emoji"`
	Paging       bool   `default:"true" toml:"paging"`
	PagerCommand string `toml:"pager_command"`
	EnglishOnly  bool   `default:"false" toml:"english_only"`
	Theme        string `default:"temp" toml:"theme"`
	HTTPProxy    string `toml:"http_proxy"`
	ClearScreen  bool   `toml:"clear_screen" default:"false"`
	FreqAlert    bool   `toml:"freq_alert" default:"false"`

	Logging LoggerConfig `toml:"logging"`

	FileExists bool  `toml:"-"`
	ModTime    int64 `toml:"-"`
}

func (*Config) CheckAndApply

func (c *Config) CheckAndApply() (err error)

type LoggerConfig

type LoggerConfig struct {
	Enable           bool   `default:"true" toml:"enable"`
	Path             string `toml:"path"`
	Level            string `default:"warn" toml:"level"`
	Stderr           bool   `default:"false" toml:"stderr"`
	RedirectToStream bool   `default:"false" toml:"redirect_to_stream"`
}

Jump to

Keyboard shortcuts

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