mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Remove error return from Client.Clone()
This commit is contained in:
parent
0d42ed73c6
commit
64619fc90f
@ -80,10 +80,7 @@ func (n *PortainerClient) do(uri, method string, request io.Reader, requestType
|
||||
|
||||
if !n.doNotUseToken {
|
||||
if n.token == "" {
|
||||
clientClone, cloneErr := n.Clone()
|
||||
if cloneErr != nil {
|
||||
return resp, cloneErr
|
||||
}
|
||||
clientClone := n.Clone()
|
||||
clientClone.doNotUseToken = true
|
||||
n.token, err = clientClone.Authenticate()
|
||||
if err != nil {
|
||||
@ -265,7 +262,7 @@ func (n *PortainerClient) GetStatus() (status Status, err error) {
|
||||
}
|
||||
|
||||
// Get a clone of the client
|
||||
func (n *PortainerClient) Clone() (c *PortainerClient, err error) {
|
||||
func (n *PortainerClient) Clone() (c *PortainerClient) {
|
||||
c = &PortainerClient{
|
||||
url: n.url,
|
||||
user: n.user,
|
||||
|
Loading…
x
Reference in New Issue
Block a user