Merge pull request #954 from adamreese/ref/lint-errors

ref(helm): fix naming issues from golint
pull/951/head
Adam Reese 8 years ago committed by GitHub
commit fd81879a8a

@ -66,7 +66,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
}
get.release = args[0]
if get.client == nil {
get.client = helm.NewClient(helm.HelmHost(helm.Config.ServAddr))
get.client = helm.NewClient(helm.Host(helm.Config.ServAddr))
}
return get.run()
},
@ -130,5 +130,5 @@ func ensureHelmClient(h helm.Interface) helm.Interface {
if h != nil {
return h
}
return helm.NewClient(helm.HelmHost(helm.Config.ServAddr))
return helm.NewClient(helm.Host(helm.Config.ServAddr))
}

@ -54,7 +54,7 @@ func newGetManifestCmd(client helm.Interface, out io.Writer) *cobra.Command {
}
get.release = args[0]
if get.client == nil {
get.client = helm.NewClient(helm.HelmHost(helm.Config.ServAddr))
get.client = helm.NewClient(helm.Host(helm.Config.ServAddr))
}
return get.run()
},

@ -80,7 +80,7 @@ func newListCmd(client helm.Interface, out io.Writer) *cobra.Command {
list.filter = strings.Join(args, " ")
}
if list.client == nil {
list.client = helm.NewClient(helm.HelmHost(helm.Config.ServAddr))
list.client = helm.NewClient(helm.Host(helm.Config.ServAddr))
}
return list.run()
},

@ -57,8 +57,8 @@ func (h *Client) Option(opts ...Option) *Client {
// Init initializes the helm client with default options
func (h *Client) Init() *Client {
return h.Option(HelmHost(DefaultHelmHost)).
Option(HelmHome(os.ExpandEnv(DefaultHelmHome)))
return h.Option(Host(DefaultHelmHost)).
Option(Home(os.ExpandEnv(DefaultHelmHome)))
}
// ListReleases lists the current releases.

@ -39,32 +39,32 @@ func ListReleases(limit int, offset string, sort rls.ListSort_SortBy, order rls.
ReleaseListSort(int32(sort)),
ReleaseListOrder(int32(order)),
}
return NewClient(HelmHost(Config.ServAddr)).ListReleases(opts...)
return NewClient(Host(Config.ServAddr)).ListReleases(opts...)
}
// GetReleaseStatus gets a release status. DEPRECATED
//
// Soon to be deprecated helm GetReleaseStatus API.
func GetReleaseStatus(rlsName string) (*rls.GetReleaseStatusResponse, error) {
return NewClient(HelmHost(Config.ServAddr)).ReleaseStatus(rlsName)
return NewClient(Host(Config.ServAddr)).ReleaseStatus(rlsName)
}
// GetReleaseContent gets the content of a release.
// Soon to be deprecated helm GetReleaseContent API.
func GetReleaseContent(rlsName string) (*rls.GetReleaseContentResponse, error) {
return NewClient(HelmHost(Config.ServAddr)).ReleaseContent(rlsName)
return NewClient(Host(Config.ServAddr)).ReleaseContent(rlsName)
}
// UpdateRelease updates a release.
// Soon to be deprecated helm UpdateRelease API.
func UpdateRelease(rlsName string) (*rls.UpdateReleaseResponse, error) {
return NewClient(HelmHost(Config.ServAddr)).UpdateRelease(rlsName)
return NewClient(Host(Config.ServAddr)).UpdateRelease(rlsName)
}
// InstallRelease runs an install for a release.
// Soon to be deprecated helm InstallRelease API.
func InstallRelease(vals []byte, rlsName, chStr string, dryRun bool) (*rls.InstallReleaseResponse, error) {
client := NewClient(HelmHost(Config.ServAddr))
client := NewClient(Host(Config.ServAddr))
if dryRun {
client.Option(DryRun())
}
@ -74,7 +74,7 @@ func InstallRelease(vals []byte, rlsName, chStr string, dryRun bool) (*rls.Insta
// UninstallRelease destroys an existing release.
// Soon to be deprecated helm UninstallRelease API.
func UninstallRelease(rlsName string, dryRun bool) (*rls.UninstallReleaseResponse, error) {
client := NewClient(HelmHost(Config.ServAddr))
client := NewClient(Host(Config.ServAddr))
if dryRun {
client.Option(DryRun())
}

@ -51,15 +51,15 @@ func DryRun() Option {
}
}
// HelmHome specifies the location of helm home, (default = "$HOME/.helm").
func HelmHome(home string) Option {
// Home specifies the location of helm home, (default = "$HOME/.helm").
func Home(home string) Option {
return func(opts *options) {
opts.home = home
}
}
// HelmHost specifies the host address of the Tiller release server, (default = ":44134").
func HelmHost(host string) Option {
// Host specifies the host address of the Tiller release server, (default = ":44134").
func Host(host string) Option {
return func(opts *options) {
opts.host = host
}

Loading…
Cancel
Save