Rename client to portainerClient in stack remove command to avoid collision with package name

This commit is contained in:
Juan Carlos Mejías Rodríguez 2019-08-08 23:20:56 -04:00
parent 2b2327939a
commit e7a48ccc3e

View File

@ -60,13 +60,13 @@ var stackRemoveCmd = &cobra.Command{
// The stack exists // The stack exists
stackId := stack.Id stackId := stack.Id
client, err := common.GetClient() portainerClient, err := common.GetClient()
common.CheckError(err) common.CheckError(err)
logrus.WithFields(logrus.Fields{ logrus.WithFields(logrus.Fields{
"stack": stackName, "stack": stackName,
}).Info("Removing stack") }).Info("Removing stack")
err = client.DeleteStack(stackId) err = portainerClient.DeleteStack(stackId)
common.CheckError(err) common.CheckError(err)
case *common.StackNotFoundError: case *common.StackNotFoundError:
// The stack does not exist // The stack does not exist