icinga

Icinga2 API client in Go
git clone https://git.olowe.co/icinga
Log | Files | Refs | README | LICENSE

commit b06b25c58a0ebeaf58a44f28f1422b842144e507
parent 6c70362050af3bf13a06cde4ed47aa49064b1813
Author: Oliver Lowe <o@olowe.co>
Date:   Wed, 12 Jan 2022 21:51:11 +1100

Remove unused attrs() method

It was required to satisfty the object interface but the interface
changed because it wasn't used anywhere.

Diffstat:
Mhost.go | 6------
Mservice.go | 6------
Muser.go | 7-------
3 files changed, 0 insertions(+), 19 deletions(-)

diff --git a/host.go b/host.go @@ -41,12 +41,6 @@ func (h Host) path() string { return "/objects/hosts/" + h.Name } -func (h Host) attrs() map[string]interface{} { - m := make(map[string]interface{}) - m["display_name"] = h.DisplayName - return m -} - func (h Host) MarshalJSON() ([]byte, error) { type Attrs struct { Address string `json:"address"` diff --git a/service.go b/service.go @@ -10,12 +10,6 @@ func (s Service) path() string { return "/objects/services/" + s.Name } -func (s Service) attrs() map[string]interface{} { - m := make(map[string]interface{}) - m["display_name"] = s.DisplayName - return m -} - // Service represents a Service object. type Service struct { Name string `json:"__name"` diff --git a/user.go b/user.go @@ -37,10 +37,3 @@ func (u User) name() string { func (u User) path() string { return "/objects/users/" + u.Name } - -func (u User) attrs() map[string]interface{} { - m := make(map[string]interface{}) - m["groups"] = u.Groups - m["email"] = u.Email - return m -}