File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -34,15 +34,15 @@ import (
34
34
"github.com/coder/serpent"
35
35
)
36
36
37
- type closers []func ()
37
+ type closerFuncs []func ()
38
38
39
- func (c closers ) Close () {
39
+ func (c closerFuncs ) Close () {
40
40
for _ , closeF := range c {
41
41
closeF ()
42
42
}
43
43
}
44
44
45
- func (c * closers ) Add (f func ()) {
45
+ func (c * closerFuncs ) Add (f func ()) {
46
46
* c = append (* c , f )
47
47
}
48
48
@@ -113,7 +113,8 @@ func (r *RootCmd) proxyServer() *serpent.Command {
113
113
serpent .RequireNArgs (0 ),
114
114
),
115
115
Handler : func (inv * serpent.Invocation ) error {
116
- var closers closers
116
+ var closers closerFuncs
117
+ defer closers .Close ()
117
118
// Main command context for managing cancellation of running
118
119
// services.
119
120
ctx , topCancel := context .WithCancel (inv .Context ())
You can’t perform that action at this time.
0 commit comments