config

package
v0.0.0-...-4a904d8 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(dir string)

LoadConfig loads a users config and creates the config if it does not exist located at ~/.config/config.json.

Types

type Config

type Config struct {
	Settings SettingsConfig `mapstructure:"settings"`
	AppTheme string         `mapstructure:"app_theme"`
}

SettingsConfig struct represents the config for the settings.

func GetConfig

func GetConfig() (config Config)

GetConfig returns the users config.

type SettingsConfig

type SettingsConfig struct {
	KerbalDir            string `mapstructure:"kerbal_dir"`
	KerbalVer            string `mapstructure:"kerbal_ver"`
	MetaRepo             string `mapstructure:"meta_repo"`
	LastRepoHash         string `mapstructure:"last_repo_hash"`
	EnableLogging        bool   `mapstructure:"enable_logging"`
	EnableMouseWheel     bool   `mapstructure:"enable_mousewheel"`
	HideIncompatibleMods bool   `mapstructure:"hide_incompatible"`
	Debug                bool   `mapstructure:"debug"`
}

SettingsConfig struct represents the config for the settings.

Jump to

Keyboard shortcuts

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