Skip to content

Commit

Permalink
use errors package in golang v20 to join multiple errors
Browse files Browse the repository at this point in the history
  • Loading branch information
henry118 committed Mar 26, 2024
1 parent 951d8d0 commit b4a161f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 59 deletions.
3 changes: 2 additions & 1 deletion libcni/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ package libcni
import (
"context"
"encoding/json"
"errors"
"fmt"
"os"
"path/filepath"
Expand Down Expand Up @@ -815,7 +816,7 @@ func (c *CNIConfig) GCNetworkList(ctx context.Context, list *NetworkConfigList,
}
}

return joinErrors(errs...)
return errors.Join(errs...)
}

func (c *CNIConfig) gcNetwork(ctx context.Context, net *NetworkConfig) error {
Expand Down
58 changes: 0 additions & 58 deletions libcni/multierror.go

This file was deleted.

0 comments on commit b4a161f

Please sign in to comment.