Rename PortainerClient.DeleteStack() to StackDelete()

This commit is contained in:
Juan Carlos Mejías Rodríguez 2019-08-26 01:21:14 -04:00
parent ea63f26ee0
commit 0b946ac0ec
2 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ type PortainerClient interface {
StackUpdate(stack portainer.Stack, environmentVariables []portainer.Pair, stackFileContent string, prune bool, endpointID portainer.EndpointID) error
// Delete stack
DeleteStack(stackID portainer.StackID) error
StackDelete(stackID portainer.StackID) error
// Get stack file content
GetStackFileContent(stackID portainer.StackID) (content string, err error)
@ -278,7 +278,7 @@ func (n *portainerClientImp) StackUpdate(stack portainer.Stack, environmentVaria
return
}
func (n *portainerClientImp) DeleteStack(stackID portainer.StackID) (err error) {
func (n *portainerClientImp) StackDelete(stackID portainer.StackID) (err error) {
err = n.doJSONWithToken(fmt.Sprintf("stacks/%d", stackID), http.MethodDelete, http.Header{}, nil, nil)
return
}

View File

@ -77,7 +77,7 @@ var stackRemoveCmd = &cobra.Command{
"stack": stackName,
"endpoint": endpoint.Name,
}).Info("Removing stack")
err := portainerClient.DeleteStack(stackID)
err := portainerClient.StackDelete(stackID)
common.CheckError(err)
logrus.WithFields(logrus.Fields{
"stack": stack.Name,