Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
68653814
Commit
68653814
authored
May 10, 2016
by
Ville Aikas
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #682 from vaikas-google/master
rename remove to delete
parents
80fe12c3
e35edc74
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
delete.go
cmd/helm/delete.go
+14
-14
No files found.
cmd/helm/
remov
e.go
→
cmd/helm/
delet
e.go
View file @
68653814
...
...
@@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
)
const
remov
eDesc
=
`
const
delet
eDesc
=
`
This command takes a release name, and then deletes the release from Kubernetes.
It removes all of the resources associated with the last release of the chart.
...
...
@@ -16,29 +16,29 @@ Use the '--dry-run' flag to see which releases will be deleted without actually
deleting them.
`
var
remov
eDryRun
bool
var
delet
eDryRun
bool
var
remov
eCommand
=
&
cobra
.
Command
{
Use
:
"
remov
e [flags] RELEASE_NAME"
,
Aliases
:
[]
string
{
"
rm
"
},
SuggestFor
:
[]
string
{
"
delete"
,
"del
"
},
Short
:
"Given a release name,
remov
e the release from Kubernetes"
,
Long
:
remov
eDesc
,
RunE
:
rm
Release
,
var
delet
eCommand
=
&
cobra
.
Command
{
Use
:
"
delet
e [flags] RELEASE_NAME"
,
Aliases
:
[]
string
{
"
del
"
},
SuggestFor
:
[]
string
{
"
remove"
,
"rm
"
},
Short
:
"Given a release name,
delet
e the release from Kubernetes"
,
Long
:
delet
eDesc
,
RunE
:
del
Release
,
}
func
init
()
{
RootCommand
.
AddCommand
(
remov
eCommand
)
removeCommand
.
Flags
()
.
BoolVar
(
&
remov
eDryRun
,
"dry-run"
,
false
,
"Simulate action, but don't actually do it."
)
RootCommand
.
AddCommand
(
delet
eCommand
)
deleteCommand
.
Flags
()
.
BoolVar
(
&
delet
eDryRun
,
"dry-run"
,
false
,
"Simulate action, but don't actually do it."
)
}
func
rm
Release
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
func
del
Release
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
if
len
(
args
)
==
0
{
return
errors
.
New
(
"Command '
remov
e' requires a release name."
)
return
errors
.
New
(
"Command '
delet
e' requires a release name."
)
}
// TODO: Handle dry run use case.
if
remov
eDryRun
{
if
delet
eDryRun
{
fmt
.
Printf
(
"DRY RUN: Deleting %s
\n
"
,
args
[
0
])
return
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment