mirror of
https://github.com/helm/helm.git
synced 2026-08-04 23:20:49 +00:00
Deal with golint warning with private executeShutdownFunc
```
Error: pkg/action/release_testing.go:60:57: unexported-return: exported method Run returns unexported type action.executeShutdownFunc, which can be annoying to use (revive)
func (r *ReleaseTesting) Run(name string) (ri.Releaser, executeShutdownFunc, error) {
```
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
This commit is contained in:
@@ -46,14 +46,14 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent,
|
||||
return shutdown()
|
||||
}
|
||||
|
||||
type executeShutdownFunc = func() error
|
||||
type ExecuteShutdownFunc = func() error
|
||||
|
||||
func shutdownNoOp() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// execHookWithDelayedShutdown executes all of the hooks for the given hook event and returns a shutdownHook function to trigger deletions after doing other things like e.g. retrieving logs.
|
||||
func (cfg *Configuration) execHookWithDelayedShutdown(rl *release.Release, hook release.HookEvent, waitStrategy kube.WaitStrategy, timeout time.Duration, serverSideApply bool) (executeShutdownFunc, error) {
|
||||
func (cfg *Configuration) execHookWithDelayedShutdown(rl *release.Release, hook release.HookEvent, waitStrategy kube.WaitStrategy, timeout time.Duration, serverSideApply bool) (ExecuteShutdownFunc, error) {
|
||||
executingHooks := []*release.Hook{}
|
||||
|
||||
for _, h := range rl.Hooks {
|
||||
|
||||
@@ -57,7 +57,7 @@ func NewReleaseTesting(cfg *Configuration) *ReleaseTesting {
|
||||
}
|
||||
|
||||
// Run executes 'helm test' against the given release.
|
||||
func (r *ReleaseTesting) Run(name string) (ri.Releaser, executeShutdownFunc, error) {
|
||||
func (r *ReleaseTesting) Run(name string) (ri.Releaser, ExecuteShutdownFunc, error) {
|
||||
if err := r.cfg.KubeClient.IsReachable(); err != nil {
|
||||
return nil, shutdownNoOp, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user