Skip to content

Commit db173a8

Browse files
committed
v2: remove ErrorHandler and IgnoreNotExist as they are not implemented
Unlike v1, these are not used/implemented in the v2 code, so removing these. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent b19a60d commit db173a8

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

v2/errors.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,9 @@ package v2
1818

1919
import (
2020
"errors"
21-
"os"
2221
)
2322

2423
var (
2524
ErrInvalidFormat = errors.New("cgroups: parsing file with invalid format failed")
2625
ErrInvalidGroupPath = errors.New("cgroups: invalid group path")
2726
)
28-
29-
// ErrorHandler is a function that handles and acts on errors
30-
type ErrorHandler func(err error) error
31-
32-
// IgnoreNotExist ignores any errors that are for not existing files
33-
func IgnoreNotExist(err error) error {
34-
if os.IsNotExist(err) {
35-
return nil
36-
}
37-
return err
38-
}

0 commit comments

Comments
 (0)