Omit empty regexp in REST API results

This will avoid having `Regexp: null` when using the REST API.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Christophe Fergeau
2025-09-24 16:09:16 +02:00
parent 99b4f4637d
commit 03e8ef3579

View File

@@ -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"`
}