Skip to content

Commit 60aedd4

Browse files
committed
Fix staticcheck lint errors
1 parent 4fd564e commit 60aedd4

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

internal/app/hook.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,8 @@ type HookMulti struct {
2626
// Returns hooks info
2727
func (hooks HookMulti) String() []string {
2828
r := []string{}
29-
for _, i := range hooks.init.String() {
30-
r = append(r, i)
31-
}
32-
for _, i := range hooks.exit.String() {
33-
r = append(r, i)
34-
}
29+
r = append(r, hooks.init.String()...)
30+
r = append(r, hooks.exit.String()...)
3531
return r
3632
}
3733

main.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ func main() {
3838
conf := app.NewConf()
3939
conf.RunInitHooks()
4040
if !conf.Oneshot() {
41-
select {
42-
case <-ctx.Done():
43-
break
44-
}
41+
<-ctx.Done()
4542
}
4643
conf.RunExitHooks()
4744
return nil

0 commit comments

Comments
 (0)