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
a3166a9c
Commit
a3166a9c
authored
Feb 04, 2016
by
Michelle Noorali
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3 from michelleN/doctor
Doctor
parents
c2483f13
5884ff12
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
doctor.go
cmd/doctor.go
+18
-0
helm.go
cmd/helm/helm.go
+8
-0
messages.go
format/messages.go
+10
-0
No files found.
cmd/doctor.go
0 → 100644
View file @
a3166a9c
package
main
import
(
"github.com/deis/helm-dm/dm"
"github.com/deis/helm-dm/kubectl"
)
func
doctor
()
error
{
var
runner
kubectl
.
Runner
runner
=
&
kubectl
.
RealRunner
{}
if
dm
.
IsInstalled
(
runner
)
{
format
.
Success
(
"You have everything you need. Go forth my friend!"
)
}
else
{
format
.
Warning
(
"Looks like you don't have DM installed.
\n
Run: `helm install`"
)
}
return
nil
}
cmd/helm/helm.go
View file @
a3166a9c
...
@@ -68,6 +68,14 @@ func commands() []cli.Command {
...
@@ -68,6 +68,14 @@ func commands() []cli.Command {
},
},
{
{
Name
:
"doctor"
,
Name
:
"doctor"
,
Usage
:
"Run a series of checks for necessary prerequisites."
,
ArgsUsage
:
""
,
Action
:
func
(
c
*
cli
.
Context
)
{
if
err
:=
doctor
();
err
!=
nil
{
format
.
Error
(
"%s"
,
err
)
os
.
Exit
(
1
)
}
},
},
},
{
{
Name
:
"deploy"
,
Name
:
"deploy"
,
...
...
format/messages.go
View file @
a3166a9c
...
@@ -20,3 +20,13 @@ func Info(msg string, v ...interface{}) {
...
@@ -20,3 +20,13 @@ func Info(msg string, v ...interface{}) {
func
Msg
(
msg
string
,
v
...
interface
{})
{
func
Msg
(
msg
string
,
v
...
interface
{})
{
fmt
.
Fprintf
(
os
.
Stdout
,
msg
,
v
...
)
fmt
.
Fprintf
(
os
.
Stdout
,
msg
,
v
...
)
}
}
func
Success
(
msg
string
,
v
...
interface
{})
{
msg
=
"[Success] "
+
msg
+
"
\n
"
fmt
.
Fprintf
(
os
.
Stdout
,
msg
,
v
...
)
}
func
Warning
(
msg
string
,
v
...
interface
{})
{
msg
=
"[Warning] "
+
msg
+
"
\n
"
fmt
.
Fprintf
(
os
.
Stdout
,
msg
,
v
...
)
}
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