ref(repo): clean up cmd/helm repo vars

pull/414/head
Michelle Noorali 9 years ago
parent cc97c522a5
commit 8c55a6ef30

@ -28,8 +28,8 @@ func init() {
addCommands(repoCommands()) addCommands(repoCommands())
} }
var dmURL string = "http://localhost:8080" var dmURL = "http://localhost:8080"
var chartRepoPath string = "chart_repositories" var chartRepoPath = "chart_repositories"
func repoCommands() cli.Command { func repoCommands() cli.Command {
return cli.Command{ return cli.Command{
@ -93,7 +93,7 @@ func addRepo(c *cli.Context) error {
} }
client := client.NewClient(dmURL) client := client.NewClient(dmURL)
var dest string = "" dest := ""
_, err := client.Post(chartRepoPath, nil, &dest) _, err := client.Post(chartRepoPath, nil, &dest)
if err != nil { if err != nil {
return err return err
@ -104,7 +104,7 @@ func addRepo(c *cli.Context) error {
func listRepos(c *cli.Context) error { func listRepos(c *cli.Context) error {
client := client.NewClient(dmURL) client := client.NewClient(dmURL)
var dest string = "" dest := ""
_, err := client.Get(chartRepoPath, &dest) _, err := client.Get(chartRepoPath, &dest)
if err != nil { if err != nil {
return err return err
@ -119,7 +119,7 @@ func removeRepo(c *cli.Context) error {
return errors.New("'helm repo remove' requires a repository as an argument") return errors.New("'helm repo remove' requires a repository as an argument")
} }
client := client.NewClient(dmURL) client := client.NewClient(dmURL)
var dest string = "" dest := ""
_, err := client.Delete(chartRepoPath, &dest) _, err := client.Delete(chartRepoPath, &dest)
if err != nil { if err != nil {
return err return err

Loading…
Cancel
Save