Skip to content

Commit

Permalink
go: use go-viper/mapstructure/v2 over archived mitchellh/mapstructure (
Browse files Browse the repository at this point in the history
  • Loading branch information
sul3n3t authored Dec 12, 2024
1 parent 1696e08 commit 71f9852
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion entproto/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"regexp"
"strings"

"github.com/mitchellh/mapstructure"
"github.com/go-viper/mapstructure/v2"

"entgo.io/ent/entc/gen"
)
Expand Down
2 changes: 1 addition & 1 deletion entproto/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion entproto/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion entproto/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion schemast/annotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down

0 comments on commit 71f9852

Please sign in to comment.