File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ import (
1515 "golang.org/x/sync/errgroup"
1616)
1717
18+ var errProcessInfoMissing = errors .New ("cmd.Process is nil" )
19+
1820// commandStage is a pipeline `Stage` based on running an external
1921// command and piping the data through its stdin and stdout.
2022type commandStage struct {
Original file line number Diff line number Diff line change @@ -4,18 +4,13 @@ package pipe
44
55import (
66 "context"
7- "errors"
87
98 "github.com/github/go-pipe/internal/ptree"
109)
1110
1211// On linux, we can limit or observe memory usage in command stages.
1312var _ LimitableStage = (* commandStage )(nil )
1413
15- var (
16- errProcessInfoMissing = errors .New ("cmd.Process is nil" )
17- )
18-
1914func (s * commandStage ) GetRSSAnon (_ context.Context ) (uint64 , error ) {
2015 if s .cmd .Process == nil {
2116 return 0 , errProcessInfoMissing
You can’t perform that action at this time.
0 commit comments