omitempty

This commit is contained in:
shoopea
2024-11-17 16:50:04 +01:00
parent 86da86684b
commit 9a9db972a7
2 changed files with 7 additions and 8 deletions

View File

@@ -23,7 +23,6 @@ type Config struct {
Apps []AppConfig `json:"apps"`
Timezone string `json:"timezone"`
Admin *AdminConfig `json:"admin"`
Debug bool `json:"debug"`
box map[string]*Box `json:"-"`
apps map[string]*App `json:"-"`
timezone *time.Location `json:"-"`
@@ -48,9 +47,9 @@ type AppConfig struct {
Schedule []string `json:"schedule"`
Sources []string `json:"src"`
Destinations []string `json:"dest"`
Before map[string]string `json:"before"`
After map[string]string `json:"after"`
Active bool `json:"active"`
Before map[string]string `json:"before,omitempty"`
After map[string]string `json:"after,omitempty"`
Active bool `json:"active,omitempty"`
}
// Load config from file