From 67760c7bfc244cbb91ca242af565dc73e8bfaab8 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sat, 31 Aug 2024 18:13:27 +0200 Subject: [PATCH] extend and format config types --- util/types.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/util/types.go b/util/types.go index 4173215..9b93bc9 100644 --- a/util/types.go +++ b/util/types.go @@ -1,14 +1,21 @@ package util type Config struct { - Name string `json:"name"` - Cmd string `json:"cmd"` - Set []Variant `json:"set,omitempty"` - Unset []Variant `json:"unset,omitempty"` + Name string `json:"name"` + Cmd string `json:"cmd"` + Set []*Variant `json:"set,omitempty"` + Unset []*Variant `json:"unset,omitempty"` } +type Type string + +const ( + TEXT Type = "text" + VARIABLE Type = "variable" +) + type Variant struct { Arguments []string `json:"args"` - Type string `json:"type,omitempty"` + Type Type `json:"type,omitempty"` Equator string `json:"equator,omitempty"` }