diff --git a/README.md b/README.md index 594d1eb2c..e1670b436 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Go version>=1.13 ### Installation ```shell -go get -u github.com/bilibili/kratos/tool/kratos +GO111MODULE=on && go get -u github.com/bilibili/kratos/tool/kratos cd $GOPATH/src kratos new kratos-demo ``` diff --git a/pkg/conf/paladin/apollo/apollo.go b/pkg/conf/paladin/apollo/apollo.go index 0ce83f9de..e30317edd 100644 --- a/pkg/conf/paladin/apollo/apollo.go +++ b/pkg/conf/paladin/apollo/apollo.go @@ -96,7 +96,7 @@ func buildConfigForApollo() (c *Config, err error) { if clusterFromEnv := os.Getenv("APOLLO_CLUSTER"); clusterFromEnv != "" { confCluster = clusterFromEnv } - if confAppID == "" { + if confCluster == "" { err = errors.New("invalid apollo cluster, pass it via APOLLO_CLUSTER=xxx with env or --apollo.cluster=xxx with flag") return } diff --git a/tool/protobuf/protoc-gen-bswagger/generator.go b/tool/protobuf/protoc-gen-bswagger/generator.go index b39fe16f2..3552d176e 100644 --- a/tool/protobuf/protoc-gen-bswagger/generator.go +++ b/tool/protobuf/protoc-gen-bswagger/generator.go @@ -166,7 +166,7 @@ func (t *swaggerGen) getOperationByHTTPMethod(httpMethod string, pathItem *swagg case http.MethodPut: pathItem.Put = op case http.MethodDelete: - pathItem.Put = op + pathItem.Delete = op case http.MethodPatch: pathItem.Patch = op default: