From 6d628fb69a306ad500b8bc4ecb51067f5b6dcf8e Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sat, 18 Jun 2022 13:18:31 -0400 Subject: Use temporary fork of gopkg.in/yaml.v3 (in main) Signed-off-by: Dave Henderson --- data/data.go | 2 +- go.mod | 8 ++++---- go.sum | 10 ++++++++-- internal/config/configfile.go | 2 +- internal/config/configfile_test.go | 2 +- internal/config/types.go | 2 +- internal/config/types_test.go | 2 +- libkv/consul.go | 2 +- 8 files changed, 18 insertions(+), 12 deletions(-) diff --git a/data/data.go b/data/data.go index 90639e02..0c81dc54 100644 --- a/data/data.go +++ b/data/data.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" "github.com/ugorji/go/codec" - yaml "gopkg.in/yaml.v3" + "github.com/hairyhenderson/yaml" ) func unmarshalObj(obj map[string]interface{}, in string, f func([]byte, interface{}) error) (map[string]interface{}, error) { diff --git a/go.mod b/go.mod index 44f5874e..c051259e 100644 --- a/go.mod +++ b/go.mod @@ -33,15 +33,14 @@ require ( golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/text v0.3.7 - gopkg.in/yaml.v3 v3.0.1 gotest.tools/v3 v3.2.0 inet.af/netaddr v0.0.0-20211027220019-c74959edd3b6 k8s.io/client-go v0.24.1 ) -// TODO: remove after https://github.com/go-yaml/yaml/pull/862 is merged and in -// a release of gopkg.in/yaml.v3 -replace gopkg.in/yaml.v3 => github.com/hairyhenderson/yaml v0.0.0-20220604201823-ac7593028a00 +// TODO: replace with gopkg.in/yaml.v3 after https://github.com/go-yaml/yaml/pull/862 +// is merged +require github.com/hairyhenderson/yaml v0.0.0-20220618171115-2d35fca545ce require ( cloud.google.com/go v0.102.0 // indirect @@ -140,4 +139,5 @@ require ( google.golang.org/protobuf v1.28.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 1770e54c..4d268f58 100644 --- a/go.sum +++ b/go.sum @@ -463,8 +463,8 @@ github.com/hairyhenderson/go-fsimpl v0.0.0-20220529183339-9deae3e35047 h1:nSSfN9 github.com/hairyhenderson/go-fsimpl v0.0.0-20220529183339-9deae3e35047/go.mod h1:30RY4Ey+bg+BGKBufZE2IEmxk7hok9U9mjdgZYomwN4= github.com/hairyhenderson/toml v0.4.2-0.20210923231440-40456b8e66cf h1:I1sbT4ZbIt9i+hB1zfKw2mE8C12TuGxPiW7YmtLbPa4= github.com/hairyhenderson/toml v0.4.2-0.20210923231440-40456b8e66cf/go.mod h1:jDHmWDKZY6MIIYltYYfW4Rs7hQ50oS4qf/6spSiZAxY= -github.com/hairyhenderson/yaml v0.0.0-20220604201823-ac7593028a00 h1:t1X2dDiy123MJ1kSIKeUxgYm7Agbks53YBqPK7FbLo4= -github.com/hairyhenderson/yaml v0.0.0-20220604201823-ac7593028a00/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +github.com/hairyhenderson/yaml v0.0.0-20220618171115-2d35fca545ce h1:cVkYhlWAxwuS2/Yp6qPtcl0fGpcWxuZNonywHZ6/I+s= +github.com/hairyhenderson/yaml v0.0.0-20220618171115-2d35fca545ce/go.mod h1:7TyiGlHI+IO+iJbqRZ82QbFtvgj/AIcFm5qc9DLn7Kc= github.com/hanwen/go-fuse v1.0.0/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok= github.com/hanwen/go-fuse/v2 v2.1.0/go.mod h1:oRyA5eK+pvJyv5otpO/DgccS8y/RvYMaO00GgRLGryc= github.com/hashicorp/consul/api v1.13.0 h1:2hnLQ0GjQvw7f3O61jMO8gbasZviZTrt9R8WzgiirHc= @@ -1413,6 +1413,12 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.2.0 h1:I0DwBVMGAx26dttAj1BtJLAkVGncrkkUXfJLC4Flt/I= gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/internal/config/configfile.go b/internal/config/configfile.go index 8bfdd0b7..2743bdac 100644 --- a/internal/config/configfile.go +++ b/internal/config/configfile.go @@ -15,8 +15,8 @@ import ( "time" "github.com/hairyhenderson/gomplate/v3/internal/iohelpers" + "github.com/hairyhenderson/yaml" "github.com/pkg/errors" - "gopkg.in/yaml.v3" ) // Parse a config file diff --git a/internal/config/configfile_test.go b/internal/config/configfile_test.go index 458306a1..cc984837 100644 --- a/internal/config/configfile_test.go +++ b/internal/config/configfile_test.go @@ -12,8 +12,8 @@ import ( "time" "github.com/hairyhenderson/gomplate/v3/internal/iohelpers" + "github.com/hairyhenderson/yaml" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" ) func TestParseConfigFile(t *testing.T) { diff --git a/internal/config/types.go b/internal/config/types.go index 042ba533..358d4d8d 100644 --- a/internal/config/types.go +++ b/internal/config/types.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "gopkg.in/yaml.v3" + "github.com/hairyhenderson/yaml" ) // Templates - a map of templates. We can't just use map[string]DataSource, diff --git a/internal/config/types_test.go b/internal/config/types_test.go index 93afd068..49225afb 100644 --- a/internal/config/types_test.go +++ b/internal/config/types_test.go @@ -4,8 +4,8 @@ import ( "net/http" "testing" + "github.com/hairyhenderson/yaml" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" ) func TestTemplates_UnmarshalYAML(t *testing.T) { diff --git a/libkv/consul.go b/libkv/consul.go index a902ab24..f51a3422 100644 --- a/libkv/consul.go +++ b/libkv/consul.go @@ -7,7 +7,7 @@ import ( "strings" "time" - yaml "gopkg.in/yaml.v3" + "github.com/hairyhenderson/yaml" "github.com/docker/libkv" "github.com/docker/libkv/store" -- cgit v1.2.3