Skip to content

Commit

Permalink
refactor(feg) replace deprecated errors module
Browse files Browse the repository at this point in the history
Replace further calls to github.com/pkg/errors module with fmt
equivalents. Created in pairing with Moritz Huebner.

Signed-off-by: Sebastian Wolf <sebastian.wolf@tngtech.com>
  • Loading branch information
wolfseb committed May 16, 2022
1 parent e920288 commit 88b55d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions feg/cloud/go/services/feg/obsidian/models/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (m FegNetworkID) ValidateModel(ctx context.Context) error {
if !swag.IsZero(m) {
exists, err := configurator.DoesNetworkExist(ctx, string(m))
if err != nil {
return fmt.Errorf(fmt.Sprintf("Failed to search for network %s: %w", string(m)), err)
return fmt.Errorf(fmt.Sprintf("Failed to search for network %s", string(m))+": %w", err)
}
if !exists {
return errors.New(fmt.Sprintf("Network: %s does not exist", string(m)))
Expand All @@ -49,7 +49,7 @@ func (m *FederatedNetworkConfigs) ValidateModel(ctx context.Context) error {
if !swag.IsZero(nid) {
exists, err := configurator.DoesNetworkExist(ctx, nid)
if err != nil {
return fmt.Errorf(fmt.Sprintf("Failed to search for network %s: %w", nid), err)
return fmt.Errorf(fmt.Sprintf("Failed to search for network %s", nid)+": %w", err)
}
if !exists {
return fmt.Errorf("Network: %s does not exist", nid)
Expand Down
1 change: 0 additions & 1 deletion feg/radius/lib/go/oc/server_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"contrib.go.opencensus.io/exporter/prometheus"
"fbc/lib/go/http/server"
"fbc/lib/go/oc/helpers"
"github.com/pkg/errors"
prom_client "github.com/prometheus/client_golang/prometheus"
"go.opencensus.io/plugin/ochttp"
"go.opencensus.io/stats/view"
Expand Down

0 comments on commit 88b55d9

Please sign in to comment.