config

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "v1.2.1"

Variables

View Source
var Conf, _ = GetConfig()

Functions

func GetConfigMain deprecated added in v1.1.0

func GetConfigMain() (string, error)

Deprecated: use GetConfigPathMain instead

func GetConfigPath

func GetConfigPath() (string, error)

func GetConfigPathGame

func GetConfigPathGame() (string, error)

func GetConfigPathMain added in v1.2.0

func GetConfigPathMain() (string, error)

func SaveConfig added in v1.2.0

func SaveConfig(c *Config) error

Types

type Config added in v1.2.0

type Config struct {
	Paths struct{ Main, Games string } // The paths to the config files
	Main  struct {
		Version        string `json:"version"` // SWkshp version
		FileReadBuffer int    `json:"buf"`     // How many bytes in buffers for reading files
	}
	Games map[string]string // The paths to the games
}
var DefaultConfig *Config

func GetConfig added in v1.2.0

func GetConfig() (*Config, error)

func GetConfigDefault added in v1.2.0

func GetConfigDefault() *Config

Jump to

Keyboard shortcuts

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