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
b5ce6939
Commit
b5ce6939
authored
Jan 07, 2016
by
Matt Butcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(*): add target command
parent
8d6007a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletion
+36
-1
helm.go
cmd/helm.go
+15
-1
target.go
cmd/target.go
+21
-0
No files found.
cmd/helm.go
View file @
b5ce6939
...
@@ -39,7 +39,21 @@ func commands() []cli.Command {
...
@@ -39,7 +39,21 @@ func commands() []cli.Command {
},
},
},
},
{
{
Name
:
"target"
,
Name
:
"target"
,
Usage
:
"Displays information about cluster."
,
ArgsUsage
:
""
,
Action
:
func
(
c
*
cli
.
Context
)
{
if
err
:=
target
(
c
.
Bool
(
"dry-run"
));
err
!=
nil
{
format
.
Error
(
err
.
Error
())
os
.
Exit
(
1
)
}
},
Flags
:
[]
cli
.
Flag
{
cli
.
BoolFlag
{
Name
:
"dry-run"
,
Usage
:
"Only display the underlying kubectl commands."
,
},
},
},
},
{
{
Name
:
"doctor"
,
Name
:
"doctor"
,
...
...
cmd/target.go
0 → 100644
View file @
b5ce6939
package
main
import
(
"fmt"
"github.com/deis/helm-dm/format"
"github.com/deis/helm-dm/kubectl"
)
func
target
(
dryRun
bool
)
error
{
client
:=
kubectl
.
Client
if
dryRun
{
client
=
kubectl
.
PrintRunner
{}
}
out
,
err
:=
client
.
ClusterInfo
()
if
err
!=
nil
{
return
fmt
.
Errorf
(
"%s (%s)"
,
out
,
err
)
}
format
.
Msg
(
string
(
out
))
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