config

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorldCLIConfigFileEnvVariable = "WORLD_CLI_CONFIG_FILE"
	WorldCLIConfigFilename        = "world.toml"
)

Variables

View Source
var GetCLIConfigDir = func() (string, error) {
	homeDir, err := os.UserHomeDir()
	if err != nil {
		return "", err
	}

	return filepath.Join(homeDir, configDir), nil
}

Functions

func SetupCLIConfigDir added in v1.8.0

func SetupCLIConfigDir() error

Types

type Config

type Config struct {
	RootDir   string
	GameDir   string
	Detach    bool
	Build     bool
	Debug     bool
	DevDA     bool
	Telemetry bool
	Timeout   int
	DockerEnv map[string]string
}

func GetConfig

func GetConfig(filename *string) (*Config, error)

GetConfig returns a Config object. If a filename is provided, it will be used as the config file. Otherwise, the config file will be searched for in the current directory and all parent directories.

Jump to

Keyboard shortcuts

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