Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions benchmarks/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

"github.com/lalamove/konfig"
config "github.com/micro/go-micro/config"
"github.com/micro/go-micro/config/source/memory"
config "github.com/micro/go-micro/v2/config"
"github.com/micro/go-micro/v2/config/source/memory"
"github.com/spf13/viper"
)

Expand Down Expand Up @@ -63,7 +63,10 @@ func newGoConfig() config.Config {
memory.WithJSON(data),
)
// Create new config
conf := config.NewConfig()
conf, err := config.NewConfig()
if err != nil {
panic("Error when creating config: " + err.Error())
}
// Load file source
conf.Load(memorySource)

Expand Down
28 changes: 3 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,32 @@ module github.com/lalamove/konfig
require (
github.com/BurntSushi/toml v0.3.1
github.com/armon/go-metrics v0.3.1 // indirect
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/coreos/bbolt v1.3.2 // indirect
github.com/coreos/etcd v3.3.10+incompatible
github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/coreos/etcd v3.3.18+incompatible
github.com/davecgh/go-spew v1.1.1
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/francoispqt/gojay v0.0.0-20181220093123-f2cc13a668ca
github.com/frankban/quicktest v1.4.1 // indirect
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 // indirect
github.com/go-test/deep v1.0.2 // indirect
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
github.com/golang/mock v1.4.3
github.com/gorilla/websocket v1.4.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.9.5 // indirect
github.com/hashicorp/consul/api v1.4.0
github.com/hashicorp/consul/sdk v0.4.0
github.com/hashicorp/go-multierror v1.1.0
github.com/hashicorp/serf v0.9.2 // indirect
github.com/hashicorp/vault/api v1.0.5-0.20200317185738-82f498082f02
github.com/hashicorp/vault/sdk v0.1.14-0.20200429182704-29fce8f27ce4 // indirect
github.com/jinzhu/copier v0.0.0-20180308034124-7e38e58719c3
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/lalamove/nui v0.2.0
github.com/micro/go-micro v1.10.0
github.com/micro/go-micro/v2 v2.9.1
github.com/mitchellh/go-testing-interface v1.0.3 // indirect
github.com/mitchellh/mapstructure v1.2.3 // indirect
github.com/pierrec/lz4 v2.2.6+incompatible // indirect
github.com/pkg/errors v0.8.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.4.0
github.com/radovskyb/watcher v1.0.5
github.com/soheilhy/cmux v0.1.4 // indirect
github.com/spf13/cast v1.3.0
github.com/spf13/viper v1.3.1
github.com/stretchr/testify v1.4.0
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
github.com/ugorji/go/codec v0.0.0-20190204201341-e444a5086c43 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.etcd.io/bbolt v1.3.3 // indirect
go.etcd.io/etcd v3.3.10+incompatible
go.uber.org/atomic v1.4.0 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.10.0 // indirect
golang.org/x/crypto v0.0.0-20200117160349-530e935923ad // indirect
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b // indirect
google.golang.org/grpc v1.23.1 // indirect
gopkg.in/square/go-jose.v2 v2.4.1 // indirect
gopkg.in/yaml.v2 v2.2.8
)
Expand Down
Loading