chore(deps): implement github.com/qdm12/golibs/command locally (#2418)

This commit is contained in:
Quentin McGaw
2024-08-21 15:21:31 +02:00
committed by GitHub
parent 4d60b71583
commit a2b3d7e30c
26 changed files with 537 additions and 95 deletions

View File

@@ -6,7 +6,7 @@ import (
)
func streamLines(ctx context.Context, done chan<- struct{},
logger Logger, stdout, stderr chan string,
logger Logger, stdout, stderr <-chan string,
tunnelReady chan<- struct{}) {
defer close(done)
@@ -16,10 +16,6 @@ func streamLines(ctx context.Context, done chan<- struct{},
errLine := false
select {
case <-ctx.Done():
// Context should only be canceled after stdout and stderr are done
// being written to.
close(stdout)
close(stderr)
return
case line = <-stdout:
case line = <-stderr: