From aa606782afa55b5808388a1cd61749e5411f0ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Mej=C3=ADas=20Rodr=C3=ADguez?= Date: Mon, 26 Aug 2019 01:25:54 -0400 Subject: [PATCH] Rename PortainerClient.GetEndpointDockerInfo() to EndpointDockerInfo() --- client/client.go | 4 ++-- common/utils.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/client.go b/client/client.go index a91f2e5..45b5cc2 100644 --- a/client/client.go +++ b/client/client.go @@ -59,7 +59,7 @@ type PortainerClient interface { StackFileInspect(stackID portainer.StackID) (content string, err error) // Get endpoint Docker info - GetEndpointDockerInfo(endpointID portainer.EndpointID) (info map[string]interface{}, err error) + EndpointDockerInfo(endpointID portainer.EndpointID) (info map[string]interface{}, err error) // Get Portainer status info GetStatus() (portainer.Status, error) @@ -296,7 +296,7 @@ func (n *portainerClientImp) StackFileInspect(stackID portainer.StackID) (conten return } -func (n *portainerClientImp) GetEndpointDockerInfo(endpointID portainer.EndpointID) (info map[string]interface{}, err error) { +func (n *portainerClientImp) EndpointDockerInfo(endpointID portainer.EndpointID) (info map[string]interface{}, err error) { err = n.doJSONWithToken(fmt.Sprintf("endpoints/%v/docker/info", endpointID), http.MethodGet, http.Header{}, nil, &info) return } diff --git a/common/utils.go b/common/utils.go index 0c1e026..28a1d09 100644 --- a/common/utils.go +++ b/common/utils.go @@ -151,7 +151,7 @@ func GetEndpointSwarmClusterID(endpointID portainer.EndpointID) (endpointSwarmCl return } - result, err := portainerClient.GetEndpointDockerInfo(endpointID) + result, err := portainerClient.EndpointDockerInfo(endpointID) if err != nil { return }