Skip to content

Commit 5e36fe5

Browse files
Merge pull request #49 from form3tech-oss/jk-bump-deps
Bump go to 1.22 & all deps
2 parents 31d0387 + 57bfe91 commit 5e36fe5

File tree

447 files changed

+28995
-8868
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+28995
-8868
lines changed

build/package/pact-proxy/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18-alpine AS build-env
1+
FROM golang:1.22-alpine AS build-env
22

33
ARG APPNAME
44
ENV GO111MODULE=auto

go.mod

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
module github.com/form3tech-oss/pact-proxy
22

3-
go 1.18
3+
go 1.22
44

55
require (
66
github.com/PaesslerAG/jsonpath v0.1.1
7-
github.com/avast/retry-go/v4 v4.3.1
8-
github.com/labstack/echo/v4 v4.9.1
9-
github.com/pact-foundation/pact-go v1.7.0
7+
github.com/avast/retry-go/v4 v4.5.1
8+
github.com/labstack/echo/v4 v4.11.4
9+
github.com/pact-foundation/pact-go v1.8.0
1010
github.com/pkg/errors v0.9.1
11-
github.com/sethvargo/go-envconfig v0.8.2
12-
github.com/sirupsen/logrus v1.9.0
13-
github.com/stretchr/testify v1.8.1
11+
github.com/sethvargo/go-envconfig v1.0.1
12+
github.com/sirupsen/logrus v1.9.3
13+
github.com/stretchr/testify v1.9.0
1414
github.com/tidwall/sjson v1.2.5
1515
)
1616

1717
require (
18-
github.com/PaesslerAG/gval v1.2.1 // indirect
18+
github.com/PaesslerAG/gval v1.2.2 // indirect
1919
github.com/davecgh/go-spew v1.1.1 // indirect
2020
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
2121
github.com/hashicorp/go-version v1.6.0 // indirect
2222
github.com/hashicorp/logutils v1.0.0 // indirect
23-
github.com/labstack/gommon v0.4.0 // indirect
23+
github.com/labstack/gommon v0.4.2 // indirect
2424
github.com/mattn/go-colorable v0.1.13 // indirect
25-
github.com/mattn/go-isatty v0.0.16 // indirect
25+
github.com/mattn/go-isatty v0.0.20 // indirect
2626
github.com/pmezard/go-difflib v1.0.0 // indirect
2727
github.com/shopspring/decimal v1.3.1 // indirect
28-
github.com/tidwall/gjson v1.14.4 // indirect
28+
github.com/tidwall/gjson v1.17.1 // indirect
2929
github.com/tidwall/match v1.1.1 // indirect
3030
github.com/tidwall/pretty v1.2.1 // indirect
3131
github.com/valyala/bytebufferpool v1.0.0 // indirect
3232
github.com/valyala/fasttemplate v1.2.2 // indirect
33-
golang.org/x/crypto v0.3.0 // indirect
34-
golang.org/x/net v0.2.0 // indirect
35-
golang.org/x/sys v0.2.0 // indirect
36-
golang.org/x/text v0.4.0 // indirect
37-
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect
33+
golang.org/x/crypto v0.22.0 // indirect
34+
golang.org/x/net v0.24.0 // indirect
35+
golang.org/x/sys v0.19.0 // indirect
36+
golang.org/x/text v0.14.0 // indirect
37+
golang.org/x/time v0.5.0 // indirect
3838
gopkg.in/yaml.v3 v3.0.1 // indirect
3939
)

go.sum

Lines changed: 47 additions & 270 deletions
Large diffs are not rendered by default.

internal/app/configuration/proxyconfig.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ import (
44
"context"
55
"net/url"
66

7-
"github.com/form3tech-oss/pact-proxy/internal/app/pactproxy"
87
"github.com/pkg/errors"
98
"github.com/sethvargo/go-envconfig"
9+
10+
"github.com/form3tech-oss/pact-proxy/internal/app/pactproxy"
1011
)
1112

1213
func NewFromEnv() (pactproxy.Config, error) {
1314
ctx := context.Background()
1415

1516
var config pactproxy.Config
16-
err := envconfig.Process(ctx, &config)
17+
err := envconfig.ProcessWith(ctx, &envconfig.Config{
18+
Target: &config,
19+
DefaultNoInit: true,
20+
})
1721
if err != nil {
1822
return config, errors.Wrap(err, "process env config")
1923
}

internal/app/configuration/proxyconfig_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import (
2121
"testing"
2222
"time"
2323

24-
"github.com/form3tech-oss/pact-proxy/internal/app/pactproxy"
2524
"github.com/pact-foundation/pact-go/utils"
2625
"github.com/stretchr/testify/require"
26+
27+
"github.com/form3tech-oss/pact-proxy/internal/app/pactproxy"
2728
)
2829

2930
const (
@@ -183,6 +184,16 @@ func TestConfigureProxy_MTLS(t *testing.T) {
183184
}
184185
}
185186

187+
// When no server address env var is specified, config.ServerAddress should be the zero value.
188+
// This is used during ConfigureProxy logic, but is no longer the default behaviour of envconfig.Process due to url.URL
189+
// containing a pointer.
190+
func TestProxyConfig_NewFromEnv_EmptyServerAddress(t *testing.T) {
191+
os.Clearenv()
192+
config, err := NewFromEnv()
193+
require.NoError(t, err)
194+
require.Equal(t, url.URL{}, config.ServerAddress)
195+
}
196+
186197
func TestProxyConfig_ForwardUnrecognisedRequests(t *testing.T) {
187198
os.Clearenv()
188199
config, err := NewFromEnv()

vendor/github.com/PaesslerAG/gval/evaluable.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/PaesslerAG/gval/language.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/PaesslerAG/gval/parse.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/PaesslerAG/gval/parser.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/avast/retry-go/v4/README.md

Lines changed: 73 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/avast/retry-go/v4/VERSION

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/avast/retry-go/v4/options.go

Lines changed: 38 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)