From 04a05fad86f0276f6e0ed3739a898e6739979c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Mej=C3=ADas=20Rodr=C3=ADguez?= Date: Fri, 2 Aug 2019 13:26:51 -0400 Subject: [PATCH] Move clientConfig declaration to the top --- common/client.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common/client.go b/common/client.go index efc8254..cc3b71b 100644 --- a/common/client.go +++ b/common/client.go @@ -17,6 +17,15 @@ import ( var client *PortainerClient +type clientConfig struct { + Url string + User string + Password string + Token string + Insecure bool + Timeout time.Duration +} + type PortainerClient struct { http.Client url *url.URL @@ -238,15 +247,6 @@ func (n *PortainerClient) GetStatus() (status Status, err error) { return } -type clientConfig struct { - Url string - User string - Password string - Token string - Insecure bool - Timeout time.Duration -} - // Create a new client func newClient(config clientConfig) (c *PortainerClient, err error) { apiUrl, err := url.Parse(config.Url + "/api/")