Configuration
Extensible TOML Files
extends = ["base.toml"]
[starship]
destination = "HD1"
use_wormholes = falseRead Configuration
package starship
import (..)
func LoadConfig(configs cconfig.Loader) (Config, error) {
var config Config
err := configs.Load("starship", &config)
if err != nil {
return Config{}, cerrors.New(err, "failed to load starship config", nil)
}
return config, nil
}
type Config struct {
Destination string `toml:"destination"`
UseWormholes bool `toml:"use_wormholes"`
}Last updated