Merge pull request #4 from bilibili/master

merge
pull/432/head
wuxingzhong 5 years ago committed by GitHub
commit a1839c0d68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      README.md
  2. 2
      pkg/conf/paladin/apollo/apollo.go
  3. 2
      tool/protobuf/protoc-gen-bswagger/generator.go

@ -33,7 +33,7 @@ Go version>=1.13
### Installation ### Installation
```shell ```shell
go get -u github.com/bilibili/kratos/tool/kratos GO111MODULE=on && go get -u github.com/bilibili/kratos/tool/kratos
cd $GOPATH/src cd $GOPATH/src
kratos new kratos-demo kratos new kratos-demo
``` ```

@ -96,7 +96,7 @@ func buildConfigForApollo() (c *Config, err error) {
if clusterFromEnv := os.Getenv("APOLLO_CLUSTER"); clusterFromEnv != "" { if clusterFromEnv := os.Getenv("APOLLO_CLUSTER"); clusterFromEnv != "" {
confCluster = 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") err = errors.New("invalid apollo cluster, pass it via APOLLO_CLUSTER=xxx with env or --apollo.cluster=xxx with flag")
return return
} }

@ -166,7 +166,7 @@ func (t *swaggerGen) getOperationByHTTPMethod(httpMethod string, pathItem *swagg
case http.MethodPut: case http.MethodPut:
pathItem.Put = op pathItem.Put = op
case http.MethodDelete: case http.MethodDelete:
pathItem.Put = op pathItem.Delete = op
case http.MethodPatch: case http.MethodPatch:
pathItem.Patch = op pathItem.Patch = op
default: default:

Loading…
Cancel
Save