Skip to content

Commit

Permalink
fix golint
Browse files Browse the repository at this point in the history
  • Loading branch information
shihyuho committed Feb 20, 2019
1 parent 1c051bd commit 9089d6b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 25 deletions.
5 changes: 1 addition & 4 deletions cmd/capctl/app/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,5 @@ func (c *deleteCmd) run() error {
ChartName: c.chartName,
ChartVersion: c.chartVersion,
}
if err := captain.CallDeleteChart(logrus.StandardLogger(), c.endpoint.String(), &request, settings.TimeoutDuration()); err != nil {
return err
}
return nil
return captain.CallDeleteChart(logrus.StandardLogger(), c.endpoint.String(), &request, settings.TimeoutDuration())
}
6 changes: 1 addition & 5 deletions cmd/capctl/app/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,5 @@ func (c *installCmd) install(path string) error {
}
}

if err := captain.CallInstallChart(logrus.StandardLogger(), c.endpoint.String(), &request, settings.TimeoutDuration()); err != nil {
return err
}

return nil
return captain.CallInstallChart(logrus.StandardLogger(), c.endpoint.String(), &request, settings.TimeoutDuration())
}
5 changes: 1 addition & 4 deletions cmd/capctl/app/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,7 @@ func (c *scriptCmd) runScript(log *logrus.Logger, path string) error {
request.Chart.Content = bytes
}

if err := captain.CallGenerateScript(log, c.endpoint.String(), &request, settings.TimeoutDuration()); err != nil {
return err
}
return nil
return captain.CallGenerateScript(log, c.endpoint.String(), &request, settings.TimeoutDuration())
}

return c.runScriptOnClient(log, abs)
Expand Down
5 changes: 1 addition & 4 deletions cmd/captain/app/server/captain_delete_chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,5 @@ func (s *CaptainServer) DeleteChart(req *captainkube_v2.DeleteChartRequest, stre
if err != nil {
return err
}
if err := d.Delete(log); err != nil {
return err
}
return nil
return d.Delete(log)
}
5 changes: 1 addition & 4 deletions pkg/helm/chart/deleter_icp.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ func (i *icpDeleter) Delete(log *logrus.Logger) error {
if err := loginBxPr(log, i.endpoint, i.username, i.password, i.account, i.skipSslValidation); err != nil {
return err
}
if err := deleteHelmChart(log, i.endpoint, i.chartName, i.chartVersion); err != nil {
return err
}
return nil
return deleteHelmChart(log, i.endpoint, i.chartName, i.chartVersion)
}

func deleteHelmChart(log *logrus.Logger, endpoint, chartName, chartVersion string) error {
Expand Down
5 changes: 1 addition & 4 deletions pkg/helm/chart/installer_icp.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ func (i *icpInstaller) Install(log *logrus.Logger) error {
if err := loginBxPr(log, i.endpoint, i.username, i.password, i.account, i.skipSslValidation); err != nil {
return err
}
if err := loadHelmChart(log, i.endpoint, i.chart); err != nil {
return err
}
return nil
return loadHelmChart(log, i.endpoint, i.chart)
}

func loadHelmChart(log *logrus.Logger, endpoint, chart string) error {
Expand Down

0 comments on commit 9089d6b

Please sign in to comment.