config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = Config{
	ShareURL: "share.code-game.org",
	DevPort:  3740,
}

Functions

This section is empty.

Types

type Config

type Config struct {
	// The codegame-share instance to use.
	ShareURL string `json:"share_url"`
	// The port to use for `codegame run`.
	DevPort int `json:"dev_port"`
}

func Load

func Load() Config

Load reads the config from disk and returns a Config object with all unset fields set to their default.

func (Config) Save

func (c Config) Save() error

Save creates or overwrites the config file with the values of self.

Jump to

Keyboard shortcuts

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