Skip to content

Commit

Permalink
change github.com/mitchellh/mapstructure to github.com/go-viper/mapst…
Browse files Browse the repository at this point in the history
…ructure/v2 v2.2.1

the author of the project archived it and blessed fork to accompany it further

https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc

mitchellh/mapstructure#349
Signed-off-by: Fedor Partanskiy <[email protected]>
  • Loading branch information
pfi79 authored and denyeart committed Oct 8, 2024
1 parent d9ca702 commit 8f6182d
Show file tree
Hide file tree
Showing 12 changed files with 142 additions and 45 deletions.
2 changes: 1 addition & 1 deletion common/viperutil/config_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"strconv"
"strings"

"github.com/go-viper/mapstructure/v2"
"github.com/hyperledger/fabric-lib-go/bccsp/factory"
"github.com/hyperledger/fabric-lib-go/common/flogging"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
"gopkg.in/yaml.v2"
)
Expand Down
2 changes: 1 addition & 1 deletion core/handlers/library/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package library
import (
"time"

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

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require (
github.com/davecgh/go-spew v1.1.1
github.com/fsouza/go-dockerclient v1.12.0
github.com/go-kit/kit v0.13.0
github.com/go-viper/mapstructure/v2 v2.2.1
github.com/gorilla/handlers v1.5.2
github.com/gorilla/mux v1.8.1
github.com/hyperledger-labs/SmartBFT v0.0.0-20240916013553-852e5be5889b
Expand All @@ -21,7 +22,6 @@ require (
github.com/hyperledger/fabric-protos-go-apiv2 v0.3.4
github.com/kr/pretty v0.3.1
github.com/miekg/pkcs11 v1.1.1
github.com/mitchellh/mapstructure v1.5.0
github.com/onsi/ginkgo/v2 v2.20.2
github.com/onsi/gomega v1.34.2
github.com/pkg/errors v0.9.1
Expand Down Expand Up @@ -69,7 +69,6 @@ require (
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/go-viper/mapstructure/v2 v2.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
Expand All @@ -85,6 +84,7 @@ require (
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/patternmatcher v0.6.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,8 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg78
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc=
github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
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/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
Expand Down
2 changes: 1 addition & 1 deletion internal/peer/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"strings"
"time"

"github.com/go-viper/mapstructure/v2"
"github.com/hyperledger/fabric-lib-go/bccsp"
"github.com/hyperledger/fabric-lib-go/bccsp/factory"
"github.com/hyperledger/fabric-lib-go/common/flogging"
Expand All @@ -26,7 +27,6 @@ import (
"github.com/hyperledger/fabric/msp"
mspmgmt "github.com/hyperledger/fabric/msp/mgmt"
"github.com/hyperledger/fabric/protoutil"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
2 changes: 1 addition & 1 deletion internal/peer/node/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (
"testing"
"time"

"github.com/go-viper/mapstructure/v2"
"github.com/hyperledger/fabric-protos-go-apiv2/common"
"github.com/hyperledger/fabric/core/handlers/library"
"github.com/hyperledger/fabric/core/testutil"
"github.com/hyperledger/fabric/internal/peer/node/mock"
msptesttools "github.com/hyperledger/fabric/msp/mgmt/testtools"
"github.com/mitchellh/mapstructure"
. "github.com/onsi/gomega"
"github.com/spf13/viper"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/localconfig/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"testing"
"time"

"github.com/go-viper/mapstructure/v2"
"github.com/hyperledger/fabric/core/config/configtest"
"github.com/mitchellh/mapstructure"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion orderer/consensus/etcdraft/consenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"code.cloudfoundry.org/clock"
"github.com/go-viper/mapstructure/v2"
"github.com/hyperledger/fabric-lib-go/bccsp"
"github.com/hyperledger/fabric-lib-go/common/flogging"
"github.com/hyperledger/fabric-lib-go/common/metrics"
Expand All @@ -26,7 +27,6 @@ import (
"github.com/hyperledger/fabric/orderer/common/types"
"github.com/hyperledger/fabric/orderer/consensus"
"github.com/hyperledger/fabric/protoutil"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
"go.etcd.io/etcd/raft/v3"
"google.golang.org/protobuf/proto"
Expand Down
2 changes: 1 addition & 1 deletion orderer/consensus/smartbft/consenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"sync/atomic"
"time"

"github.com/go-viper/mapstructure/v2"
"github.com/hyperledger-labs/SmartBFT/pkg/api"
"github.com/hyperledger-labs/SmartBFT/pkg/wal"
"github.com/hyperledger/fabric-lib-go/bccsp"
Expand All @@ -35,7 +36,6 @@ import (
"github.com/hyperledger/fabric/orderer/consensus"
"github.com/hyperledger/fabric/orderer/consensus/smartbft/util"
"github.com/hyperledger/fabric/protoutil"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
"go.uber.org/zap"
"google.golang.org/protobuf/proto"
Expand Down
61 changes: 57 additions & 4 deletions vendor/github.com/go-viper/mapstructure/v2/decode_hooks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8f6182d

Please sign in to comment.