config

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = app.Register(&app.Command[app.Empty, app.Empty]{
	Use:    "config",
	Desc:   "Edit config file",
	Action: "Edit",

	RunNoContext: func() error {
		path := config.GetDir("config.toml")
		return app.Edit(path, config.DefaultConfig, "config.toml", func(s string) error {
			data := []byte(s)
			var cfg config.Config
			err := toml.Unmarshal(data, &cfg)
			return errors.Trace(err, "parse toml")
		})
	},
})

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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