Merge pull request #8 from cosmos/cwgoes/patch-fix

Minor cleanup
This commit is contained in:
HaoyangLiu 2018-10-04 18:42:23 +08:00 committed by GitHub
commit d46b5629c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 31 additions and 32 deletions

View File

@ -3,7 +3,7 @@ version: 2
defaults: &defaults
working_directory: /go/src/github.com/cosmos/cosmos-sdk
docker:
- image: circleci/golang:1.10.3
- image: circleci/golang:1.11.1
environment:
GOBIN: /tmp/workspace/bin

View File

@ -45,7 +45,7 @@ build-linux:
LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 $(MAKE) build
update_gaia_lite_docs:
@statik -src=client/lcd/swagger-ui -dest=client/lcd
@statik -src=client/lcd/swagger-ui -dest=client/lcd -f
build_cosmos-sdk-cli:
ifeq ($(OS),Windows_NT)
@ -182,14 +182,14 @@ test_cover:
test_lint:
gometalinter.v2 --config=tools/gometalinter.json ./...
!(gometalinter.v2 --exclude /usr/lib/go/src/ --disable-all --enable='errcheck' --vendor ./... | grep -v "client/")
!(gometalinter.v2 --exclude /usr/lib/go/src/ --exclude client/lcd/statik/statik.go --disable-all --enable='errcheck' --vendor ./... | grep -v "client/")
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -d -s
dep status >> /dev/null
!(grep -n branch Gopkg.toml)
format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -w -s
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs misspell -w
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gofmt -w -s
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs misspell -w
benchmark:
@go test -bench=. $(PACKAGES_NOSIMULATION)

View File

@ -35,7 +35,7 @@ const (
FlagPrintResponse = "print-response"
FlagDryRun = "dry-run"
FlagGenerateOnly = "generate-only"
FlagIndentResponse= "indent"
FlagIndentResponse = "indent"
)
// LineBreak can be included in a command list to provide a blank line

View File

@ -141,7 +141,6 @@ func createHandler(cdc *codec.Codec) *mux.Router {
cliCtx := context.NewCLIContext().WithCodec(cdc)
// TODO: make more functional? aka r = keys.RegisterRoutes(r)
r.HandleFunc("/version", CLIVersionRequestHandler).Methods("GET")
r.HandleFunc("/node_version", NodeVersionRequestHandler(cliCtx)).Methods("GET")

View File

@ -8,11 +8,11 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/utils"
"github.com/gorilla/mux"
"github.com/spf13/cobra"
"github.com/spf13/viper"
tmliteProxy "github.com/tendermint/tendermint/lite/proxy"
"github.com/cosmos/cosmos-sdk/client/utils"
)
//BlockCommand returns the verified block data for a given heights

View File

@ -13,11 +13,11 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/utils"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/spf13/viper"
"github.com/cosmos/cosmos-sdk/client/utils"
)
// QueryTxCmd implements the default command for a tx query.

View File

@ -15,8 +15,8 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/cosmos/cosmos-sdk/client/utils"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
)
const (

View File

@ -6,5 +6,5 @@
"Deadline": "500s",
"Vendor": true,
"Cyclo": 11,
"Exclude": ["/usr/lib/go/src/"]
"Exclude": ["/usr/lib/go/src/", "client/lcd/statik/statik.go"]
}