extend and format config types

This commit is contained in:
Baipyrus 2024-08-31 18:13:27 +02:00
parent 16d0bd7ca4
commit 67760c7bfc

View File

@ -1,14 +1,21 @@
package util package util
type Config struct { type Config struct {
Name string `json:"name"` Name string `json:"name"`
Cmd string `json:"cmd"` Cmd string `json:"cmd"`
Set []Variant `json:"set,omitempty"` Set []*Variant `json:"set,omitempty"`
Unset []Variant `json:"unset,omitempty"` Unset []*Variant `json:"unset,omitempty"`
} }
type Type string
const (
TEXT Type = "text"
VARIABLE Type = "variable"
)
type Variant struct { type Variant struct {
Arguments []string `json:"args"` Arguments []string `json:"args"`
Type string `json:"type,omitempty"` Type Type `json:"type,omitempty"`
Equator string `json:"equator,omitempty"` Equator string `json:"equator,omitempty"`
} }