From 1ebbbf24c573ddb241b22fae6f5ea6c45482b015 Mon Sep 17 00:00:00 2001 From: Hank Donnay Date: Thu, 18 May 2023 11:38:41 -0500 Subject: [PATCH] config: add some omitempty tags These are rarely set, but will start getting exercised more with future changes. Signed-off-by: Hank Donnay --- config/matchers.go | 2 +- config/updaters.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/matchers.go b/config/matchers.go index 477ed9b56e..433fa69b44 100644 --- a/config/matchers.go +++ b/config/matchers.go @@ -20,5 +20,5 @@ type Matchers struct { // "suse" // "ubuntu" // "crda" - remotematcher calls hosted api via RPC. - Names []string `yaml:"names" json:"names"` + Names []string `yaml:"names,omitempty" json:"names,omitempty"` } diff --git a/config/updaters.go b/config/updaters.go index bfea1bb7da..cb00a3b8c8 100644 --- a/config/updaters.go +++ b/config/updaters.go @@ -7,7 +7,7 @@ type Updaters struct { // TODO(louis): this is only used in clairctl, should we keep this? // it may offer an escape hatch for a particular updater name // from running, vs disabling the updater set completely. - Filter string `yaml:"filter" json:"filter"` + Filter string `yaml:"filter,omitempty" json:"filter,omitempty"` // Config holds configuration blocks for UpdaterFactories and Updaters, // keyed by name. //