Skip to content

Commit

Permalink
Merge pull request #107 from mrueg/drop-errors-pkg
Browse files Browse the repository at this point in the history
web: Replace pkg/errors with stdlib errors
  • Loading branch information
SuperQ authored Aug 29, 2022
2 parents 20d0b0c + 2e0e393 commit 7a8b2e9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go 1.17

require (
github.com/go-kit/log v0.2.1
github.com/pkg/errors v0.9.1
github.com/prometheus/common v0.37.0
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd
gopkg.in/alecthomas/kingpin.v2 v2.2.6
Expand Down
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down
4 changes: 2 additions & 2 deletions web/tls_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package web
import (
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"net"
"net/http"
Expand All @@ -24,7 +25,6 @@ import (

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/pkg/errors"
config_util "github.com/prometheus/common/config"
"gopkg.in/yaml.v2"
)
Expand Down Expand Up @@ -109,7 +109,7 @@ func ConfigToTLSConfig(c *TLSStruct) (*tls.Config, error) {
loadCert := func() (*tls.Certificate, error) {
cert, err := tls.LoadX509KeyPair(c.TLSCertPath, c.TLSKeyPath)
if err != nil {
return nil, errors.Wrap(err, "failed to load X509KeyPair")
return nil, fmt.Errorf("failed to load X509KeyPair: %w", err)
}
return &cert, nil
}
Expand Down

0 comments on commit 7a8b2e9

Please sign in to comment.