Skip to content

Commit 903aad4

Browse files
Merge pull request #46 from github/fix-compilation-issues-for-non-linux-systems
Move errProcessInfoMissing to platform-independent file
2 parents 3f94cd7 + 3a4c745 commit 903aad4

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

pipe/command.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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.
2022
type commandStage struct {

pipe/command_linux.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,13 @@ package pipe
44

55
import (
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.
1312
var _ LimitableStage = (*commandStage)(nil)
1413

15-
var (
16-
errProcessInfoMissing = errors.New("cmd.Process is nil")
17-
)
18-
1914
func (s *commandStage) GetRSSAnon(_ context.Context) (uint64, error) {
2015
if s.cmd.Process == nil {
2116
return 0, errProcessInfoMissing

0 commit comments

Comments
 (0)