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
137867b4
Commit
137867b4
authored
May 25, 2016
by
Adam Reese
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #760 from adamreese/fix/style
fix(style): cleanup coding style on error returns
parents
b1e0c8fc
94432ffb
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
14 additions
and
55 deletions
+14
-55
create.go
cmd/helm/create.go
+2
-5
helm.go
cmd/helm/helm.go
+2
-4
install.go
cmd/helm/install.go
+0
-2
repo.go
cmd/helm/repo.go
+4
-18
tunnel.go
cmd/helm/tunnel.go
+1
-1
chart_test.go
pkg/chart/chart_test.go
+1
-5
save.go
pkg/chart/save.go
+1
-5
local.go
pkg/repo/local.go
+1
-5
repo.go
pkg/repo/repo.go
+2
-10
No files found.
cmd/helm/create.go
View file @
137867b4
...
...
@@ -55,9 +55,6 @@ func runCreate(cmd *cobra.Command, args []string) error {
Version
:
"0.1.0"
,
}
if
_
,
err
:=
chart
.
Create
(
&
cfile
,
filepath
.
Dir
(
cname
));
err
!=
nil
{
return
err
}
return
nil
_
,
err
:=
chart
.
Create
(
&
cfile
,
filepath
.
Dir
(
cname
))
return
err
}
cmd/helm/helm.go
View file @
137867b4
...
...
@@ -12,10 +12,8 @@ import (
)
const
(
homeEnvVar
=
"HELM_HOME"
defaultHome
=
"$HOME/.helm"
// FIXME: is $HOME windows compatible?
hostEnvVar
=
"HELM_HOST"
defaultHost
=
":44134"
homeEnvVar
=
"HELM_HOME"
hostEnvVar
=
"HELM_HOST"
)
var
helmHome
string
...
...
cmd/helm/install.go
View file @
137867b4
...
...
@@ -24,8 +24,6 @@ chart in the current working directory.
// install flags & args
var
(
// installArg is the name or relative path of the chart to install
installArg
string
// installDryRun performs a dry-run install
installDryRun
bool
// installValues is the filename of supplied values.
...
...
cmd/helm/repo.go
View file @
137867b4
...
...
@@ -89,10 +89,7 @@ func runRepoRemove(cmd *cobra.Command, args []string) error {
if
err
:=
checkArgsLength
(
1
,
len
(
args
),
"name of chart repository"
);
err
!=
nil
{
return
err
}
if
err
:=
removeRepoLine
(
args
[
0
]);
err
!=
nil
{
return
err
}
return
nil
return
removeRepoLine
(
args
[
0
])
}
func
runRepoIndex
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
...
...
@@ -105,11 +102,7 @@ func runRepoIndex(cmd *cobra.Command, args []string) error {
return
err
}
if
err
:=
index
(
path
,
args
[
1
]);
err
!=
nil
{
return
err
}
return
nil
return
index
(
path
,
args
[
1
])
}
func
index
(
dir
,
url
string
)
error
{
...
...
@@ -118,10 +111,7 @@ func index(dir, url string) error {
return
err
}
if
err
:=
chartRepo
.
Index
();
err
!=
nil
{
return
err
}
return
nil
return
chartRepo
.
Index
()
}
func
removeRepoLine
(
name
string
)
error
{
...
...
@@ -165,9 +155,5 @@ func insertRepoLine(name, url string) error {
f
.
Repositories
[
name
]
=
url
b
,
_
:=
yaml
.
Marshal
(
&
f
.
Repositories
)
if
err
:=
ioutil
.
WriteFile
(
repositoriesFile
(),
b
,
0666
);
err
!=
nil
{
return
err
}
return
nil
return
ioutil
.
WriteFile
(
repositoriesFile
(),
b
,
0666
)
}
cmd/helm/tunnel.go
View file @
137867b4
...
...
@@ -17,7 +17,7 @@ func newTillerPortForwarder() (*kube.Tunnel, error) {
if
err
!=
nil
{
return
nil
,
err
}
// FIXME use a constain that is access
a
ble on init
// FIXME use a constain that is access
i
ble on init
const
tillerPort
=
44134
return
kube
.
New
(
nil
)
.
ForwardPort
(
"helm"
,
podName
,
tillerPort
)
}
...
...
pkg/chart/chart_test.go
View file @
137867b4
...
...
@@ -191,11 +191,7 @@ func findMember(root, path string, members []*Member) error {
for
_
,
member
:=
range
members
{
if
member
.
Path
==
path
{
filename
:=
filepath
.
Join
(
root
,
path
)
if
err
:=
compareContent
(
filename
,
member
.
Content
);
err
!=
nil
{
return
err
}
return
nil
return
compareContent
(
filename
,
member
.
Content
)
}
}
...
...
pkg/chart/save.go
View file @
137867b4
...
...
@@ -103,11 +103,7 @@ func Save(c *Chart, outDir string) (string, error) {
}
_
,
err
=
io
.
Copy
(
twriter
,
in
)
in
.
Close
()
if
err
!=
nil
{
return
err
}
return
nil
return
err
})
if
err
!=
nil
{
rollback
=
true
...
...
pkg/repo/local.go
View file @
137867b4
...
...
@@ -46,11 +46,7 @@ func AddChartToLocalRepo(ch *chart.Chart, path string) error {
if
err
!=
nil
{
return
err
}
err
=
Reindex
(
ch
,
path
+
"/index.yaml"
)
if
err
!=
nil
{
return
err
}
return
nil
return
Reindex
(
ch
,
path
+
"/index.yaml"
)
}
// Reindex adds an entry to the index file at the given path
...
...
pkg/repo/repo.go
View file @
137867b4
...
...
@@ -98,11 +98,7 @@ func (r *ChartRepository) saveIndexFile() error {
return
err
}
if
err
=
ioutil
.
WriteFile
(
filepath
.
Join
(
r
.
RootPath
,
indexPath
),
index
,
0644
);
err
!=
nil
{
return
err
}
return
nil
return
ioutil
.
WriteFile
(
filepath
.
Join
(
r
.
RootPath
,
indexPath
),
index
,
0644
)
}
func
(
r
*
ChartRepository
)
Index
()
error
{
...
...
@@ -143,11 +139,7 @@ func (r *ChartRepository) Index() error {
}
if
err
:=
r
.
saveIndexFile
();
err
!=
nil
{
return
err
}
return
nil
return
r
.
saveIndexFile
()
}
func
generateChecksum
(
path
string
)
(
string
,
error
)
{
...
...
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