Skip to content

Commit 45c5f3a

Browse files
committed
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>
1 parent 70fc5f9 commit 45c5f3a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/action/hooks.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent,
4646
return shutdown()
4747
}
4848

49-
type executeShutdownFunc = func() error
49+
type ExecuteShutdownFunc = func() error
5050

5151
func shutdownNoOp() error {
5252
return nil
5353
}
5454

5555
// 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.
56-
func (cfg *Configuration) execHookWithDelayedShutdown(rl *release.Release, hook release.HookEvent, waitStrategy kube.WaitStrategy, timeout time.Duration, serverSideApply bool) (executeShutdownFunc, error) {
56+
func (cfg *Configuration) execHookWithDelayedShutdown(rl *release.Release, hook release.HookEvent, waitStrategy kube.WaitStrategy, timeout time.Duration, serverSideApply bool) (ExecuteShutdownFunc, error) {
5757
executingHooks := []*release.Hook{}
5858

5959
for _, h := range rl.Hooks {

pkg/action/release_testing.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func NewReleaseTesting(cfg *Configuration) *ReleaseTesting {
5757
}
5858

5959
// Run executes 'helm test' against the given release.
60-
func (r *ReleaseTesting) Run(name string) (ri.Releaser, executeShutdownFunc, error) {
60+
func (r *ReleaseTesting) Run(name string) (ri.Releaser, ExecuteShutdownFunc, error) {
6161
if err := r.cfg.KubeClient.IsReachable(); err != nil {
6262
return nil, shutdownNoOp, err
6363
}

0 commit comments

Comments
 (0)