From 48f1ae98bacd2c73a0a04abd32afe43fd057bbec Mon Sep 17 00:00:00 2001 From: Wade Simmons Date: Wed, 12 Nov 2025 10:26:22 -0500 Subject: [PATCH] switch to go.yaml.in/yaml (#1478) The `gopkg.in/yaml.v3` library has been declared as Unmaintained: - https://github.com/go-yaml/yaml?tab=readme-ov-file#this-project-is-unmaintained The YAML org has taken over maintaining it and now publishes it as `go.yaml.in/yaml`: - https://github.com/yaml/go-yaml --- config/config.go | 2 +- config/config_test.go | 2 +- e2e/handshakes_test.go | 2 +- e2e/helpers_test.go | 2 +- go.mod | 1 + go.sum | 2 ++ lighthouse_test.go | 2 +- main.go | 2 +- service/service_test.go | 2 +- 9 files changed, 10 insertions(+), 7 deletions(-) diff --git a/config/config.go b/config/config.go index 5510324..0d1be12 100644 --- a/config/config.go +++ b/config/config.go @@ -17,7 +17,7 @@ import ( "dario.cat/mergo" "github.com/sirupsen/logrus" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type C struct { diff --git a/config/config_test.go b/config/config_test.go index ec5a4b0..aba7b2a 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -10,7 +10,7 @@ import ( "github.com/slackhq/nebula/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestConfig_Load(t *testing.T) { diff --git a/e2e/handshakes_test.go b/e2e/handshakes_test.go index 53d3738..7e751c5 100644 --- a/e2e/handshakes_test.go +++ b/e2e/handshakes_test.go @@ -20,7 +20,7 @@ import ( "github.com/slackhq/nebula/udp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func BenchmarkHotPath(b *testing.B) { diff --git a/e2e/helpers_test.go b/e2e/helpers_test.go index 3014096..8c19d3b 100644 --- a/e2e/helpers_test.go +++ b/e2e/helpers_test.go @@ -22,7 +22,7 @@ import ( "github.com/slackhq/nebula/config" "github.com/slackhq/nebula/e2e/router" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type m = map[string]any diff --git a/go.mod b/go.mod index b060abc..0d89d55 100644 --- a/go.mod +++ b/go.mod @@ -22,6 +22,7 @@ require ( github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 github.com/stretchr/testify v1.11.1 github.com/vishvananda/netlink v1.3.1 + go.yaml.in/yaml/v3 v3.0.4 golang.org/x/crypto v0.43.0 golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 golang.org/x/net v0.45.0 diff --git a/go.sum b/go.sum index 3aee30a..b826323 100644 --- a/go.sum +++ b/go.sum @@ -155,6 +155,8 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= diff --git a/lighthouse_test.go b/lighthouse_test.go index d8a1188..fea1d1e 100644 --- a/lighthouse_test.go +++ b/lighthouse_test.go @@ -14,7 +14,7 @@ import ( "github.com/slackhq/nebula/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) func TestOldIPv4Only(t *testing.T) { diff --git a/main.go b/main.go index 98c849a..b37df49 100644 --- a/main.go +++ b/main.go @@ -13,7 +13,7 @@ import ( "github.com/slackhq/nebula/sshd" "github.com/slackhq/nebula/udp" "github.com/slackhq/nebula/util" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" ) type m = map[string]any diff --git a/service/service_test.go b/service/service_test.go index f1c91a7..c6b8742 100644 --- a/service/service_test.go +++ b/service/service_test.go @@ -16,8 +16,8 @@ import ( "github.com/slackhq/nebula/cert_test" "github.com/slackhq/nebula/config" "github.com/slackhq/nebula/overlay" + "go.yaml.in/yaml/v3" "golang.org/x/sync/errgroup" - "gopkg.in/yaml.v3" ) type m = map[string]any