From 3f2f6445d0ea99feba2547e8ca8bf9b1383dc829 Mon Sep 17 00:00:00 2001 From: Bruno Agenor Date: Mon, 21 Nov 2022 14:14:53 -0300 Subject: [PATCH 1/2] Field to manage hosts macros --- host.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/host.go b/host.go index d5bfd41..7a9795d 100644 --- a/host.go +++ b/host.go @@ -35,6 +35,9 @@ type Host struct { Error string `json:"error"` Name string `json:"name"` Status StatusType `json:"status,string"` + + // Field to manage macros + UserMacros Macros `json:"macros"` // Fields below used only when creating hosts GroupIds HostGroupIDs `json:"groups,omitempty"` From 5bc93a5a9c38092ea4b5a9af6ee51e8ee371fef0 Mon Sep 17 00:00:00 2001 From: Bruno Agenor Date: Mon, 21 Nov 2022 15:18:27 -0300 Subject: [PATCH 2/2] omitempty macros --- host.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host.go b/host.go index 7a9795d..9818222 100644 --- a/host.go +++ b/host.go @@ -37,7 +37,7 @@ type Host struct { Status StatusType `json:"status,string"` // Field to manage macros - UserMacros Macros `json:"macros"` + UserMacros Macros `json:"macros,omitempty"` // Fields below used only when creating hosts GroupIds HostGroupIDs `json:"groups,omitempty"`