feat: replace github.com/pkg/errors to errors
Signed-off-by: haoyun <yun.hao@daocloud.io> Co-authored-by: zounengren <zouyee1989@gmail.com>
This commit is contained in:
@@ -18,6 +18,7 @@ package logging
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
@@ -25,7 +26,6 @@ import (
|
||||
"syscall"
|
||||
|
||||
"github.com/Microsoft/go-winio"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// Run the logging driver
|
||||
@@ -53,19 +53,19 @@ func runInternal(fn LoggerFunc) error {
|
||||
return errors.New("'CONTAINER_STDOUT' environment variable missing")
|
||||
}
|
||||
if sout, err = winio.DialPipeContext(ctx, soutPipe); err != nil {
|
||||
return errors.Wrap(err, "unable to dial stdout pipe")
|
||||
return fmt.Errorf("unable to dial stdout pipe: %w", err)
|
||||
}
|
||||
|
||||
if serrPipe, ok = os.LookupEnv("CONTAINER_STDERR"); !ok {
|
||||
return errors.New("'CONTAINER_STDERR' environment variable missing")
|
||||
}
|
||||
if serr, err = winio.DialPipeContext(ctx, serrPipe); err != nil {
|
||||
return errors.Wrap(err, "unable to dial stderr pipe")
|
||||
return fmt.Errorf("unable to dial stderr pipe: %w", err)
|
||||
}
|
||||
|
||||
waitPipe = os.Getenv("CONTAINER_WAIT")
|
||||
if wait, err = winio.DialPipeContext(ctx, waitPipe); err != nil {
|
||||
return errors.Wrap(err, "unable to dial wait pipe")
|
||||
return fmt.Errorf("unable to dial wait pipe: %w", err)
|
||||
}
|
||||
|
||||
config := &Config{
|
||||
|
||||
Reference in New Issue
Block a user