diff --git a/entproto/enum.go b/entproto/enum.go index dabf45497..72c585130 100644 --- a/entproto/enum.go +++ b/entproto/enum.go @@ -20,7 +20,7 @@ import ( "regexp" "strings" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" "entgo.io/ent/entc/gen" ) diff --git a/entproto/field.go b/entproto/field.go index 8e0861f4e..390ee548d 100644 --- a/entproto/field.go +++ b/entproto/field.go @@ -19,7 +19,7 @@ import ( "entgo.io/ent/entc/gen" "entgo.io/ent/schema" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" "google.golang.org/protobuf/types/descriptorpb" ) diff --git a/entproto/message.go b/entproto/message.go index b386547ae..cc50e377b 100644 --- a/entproto/message.go +++ b/entproto/message.go @@ -19,7 +19,7 @@ import ( "entgo.io/ent/entc/gen" "entgo.io/ent/schema" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" ) const MessageAnnotation = "ProtoMessage" diff --git a/entproto/service.go b/entproto/service.go index bf8dec67b..b0385d71c 100644 --- a/entproto/service.go +++ b/entproto/service.go @@ -20,7 +20,7 @@ import ( "entgo.io/ent/entc/gen" "entgo.io/ent/schema" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" "google.golang.org/protobuf/types/descriptorpb" _ "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/go.mod b/go.mod index 284328d49..d798c9595 100644 --- a/go.mod +++ b/go.mod @@ -8,11 +8,11 @@ require ( github.com/AlekSi/pointer v1.1.0 github.com/alecthomas/kong v0.7.0 github.com/go-openapi/inflect v0.19.0 + github.com/go-viper/mapstructure/v2 v2.2.1 github.com/google/uuid v1.6.0 github.com/hashicorp/go-multierror v1.1.1 github.com/jhump/protoreflect v1.10.1 github.com/mattn/go-sqlite3 v1.14.16 - github.com/mitchellh/mapstructure v1.5.0 github.com/ogen-go/ogen v0.56.1 github.com/oklog/ulid/v2 v2.0.2 github.com/stoewer/go-strcase v1.2.0 @@ -51,6 +51,7 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/segmentio/asm v1.2.0 // indirect github.com/sosodev/duration v1.3.1 // indirect diff --git a/go.sum b/go.sum index 36883d8ea..d791206a8 100644 --- a/go.sum +++ b/go.sum @@ -59,6 +59,8 @@ github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNP github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= diff --git a/schemast/annotation.go b/schemast/annotation.go index efecc6250..82754eb07 100644 --- a/schemast/annotation.go +++ b/schemast/annotation.go @@ -22,7 +22,7 @@ import ( "entgo.io/contrib/entproto" "entgo.io/ent/dialect/entsql" "entgo.io/ent/schema" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" "google.golang.org/protobuf/types/descriptorpb" )