From 03e8ef3579cda258d78f67e394a067aa68e65e18 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Wed, 24 Sep 2025 16:09:16 +0200 Subject: [PATCH] Omit empty regexp in REST API results This will avoid having `Regexp: null` when using the REST API. Signed-off-by: Christophe Fergeau --- pkg/types/configuration.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/types/configuration.go b/pkg/types/configuration.go index d4007e4c..cf56dc3e 100644 --- a/pkg/types/configuration.go +++ b/pkg/types/configuration.go @@ -79,5 +79,5 @@ type Zone struct { type Record struct { Name string `yaml:"name,omitempty"` IP net.IP `yaml:"ip,omitempty"` - Regexp *regexp.Regexp `yaml:"regexp,omitempty"` + Regexp *regexp.Regexp `json:",omitempty" yaml:"regexp,omitempty"` }