diff --git a/go.mod b/go.mod index c9adc86a03..1f7622d9c5 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,6 @@ require ( github.com/duo-labs/webauthn v0.0.0-20210727191636-9f1b88ef44cc github.com/envoyproxy/protoc-gen-validate v0.6.2 github.com/getsentry/sentry-go v0.11.0 - github.com/ghodss/yaml v1.0.0 github.com/golang/glog v1.0.0 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.2 @@ -93,6 +92,7 @@ require ( k8s.io/apimachinery v0.22.4 k8s.io/client-go v0.22.4 sigs.k8s.io/controller-runtime v0.10.3 + sigs.k8s.io/yaml v1.3.0 ) replace github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.4 diff --git a/internal/admin/repository/eventsourcing/eventstore/iam.go b/internal/admin/repository/eventsourcing/eventstore/iam.go index e4ad17539e..4c88132f48 100644 --- a/internal/admin/repository/eventsourcing/eventstore/iam.go +++ b/internal/admin/repository/eventsourcing/eventstore/iam.go @@ -9,8 +9,8 @@ import ( "strings" "sync" - "github.com/ghodss/yaml" "golang.org/x/text/language" + "sigs.k8s.io/yaml" "github.com/caos/zitadel/internal/domain" v1 "github.com/caos/zitadel/internal/eventstore/v1" diff --git a/internal/config/config.go b/internal/config/config.go index f49d9c3edf..4f060635cb 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -7,7 +7,7 @@ import ( "path/filepath" "github.com/BurntSushi/toml" - "github.com/ghodss/yaml" + "sigs.k8s.io/yaml" "github.com/caos/zitadel/internal/errors" ) diff --git a/internal/i18n/i18n.go b/internal/i18n/i18n.go index 0ed99dd652..0281322c27 100644 --- a/internal/i18n/i18n.go +++ b/internal/i18n/i18n.go @@ -10,10 +10,10 @@ import ( "github.com/BurntSushi/toml" "github.com/caos/logging" - "github.com/ghodss/yaml" "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils" "github.com/nicksnyder/go-i18n/v2/i18n" "golang.org/x/text/language" + "sigs.k8s.io/yaml" "github.com/caos/zitadel/internal/api/authz" http_util "github.com/caos/zitadel/internal/api/http" @@ -55,7 +55,7 @@ func NewTranslator(dir http.FileSystem, config TranslatorConfig) (*Translator, e func newBundle(dir http.FileSystem, defaultLanguage language.Tag) (*i18n.Bundle, error) { bundle := i18n.NewBundle(defaultLanguage) - bundle.RegisterUnmarshalFunc("yaml", yaml.Unmarshal) + bundle.RegisterUnmarshalFunc("yaml", func(data []byte, v interface{}) error { return yaml.Unmarshal(data, v) }) bundle.RegisterUnmarshalFunc("json", json.Unmarshal) bundle.RegisterUnmarshalFunc("toml", toml.Unmarshal) i18nDir, err := dir.Open(i18nPath) diff --git a/internal/management/repository/eventsourcing/eventstore/org.go b/internal/management/repository/eventsourcing/eventstore/org.go index 1f75f7e84f..4c3f8c2b40 100644 --- a/internal/management/repository/eventsourcing/eventstore/org.go +++ b/internal/management/repository/eventsourcing/eventstore/org.go @@ -12,9 +12,9 @@ import ( "time" "github.com/caos/logging" - "github.com/ghodss/yaml" "github.com/golang/protobuf/ptypes" "golang.org/x/text/language" + "sigs.k8s.io/yaml" "github.com/caos/zitadel/internal/api/authz" "github.com/caos/zitadel/internal/config/systemdefaults"