Skip to content

Commit

Permalink
Run make format
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessio Treglia committed Dec 10, 2018
1 parent ac0a7c0 commit 24a1670
Show file tree
Hide file tree
Showing 134 changed files with 373 additions and 229 deletions.
3 changes: 2 additions & 1 deletion baseapp/helpers.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package baseapp

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/tendermint/tendermint/abci/server"
abci "github.com/tendermint/tendermint/abci/types"
cmn "github.com/tendermint/tendermint/libs/common"

sdk "github.com/cosmos/cosmos-sdk/types"
)

// nolint - Mostly for testing
Expand Down
3 changes: 2 additions & 1 deletion baseapp/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ package baseapp
import (
"fmt"

dbm "github.com/tendermint/tendermint/libs/db"

"github.com/cosmos/cosmos-sdk/store"
sdk "github.com/cosmos/cosmos-sdk/types"
dbm "github.com/tendermint/tendermint/libs/db"
)

// File for storing in-package BaseApp optional functions,
Expand Down
3 changes: 2 additions & 1 deletion baseapp/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"fmt"
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"

sdk "github.com/cosmos/cosmos-sdk/types"
)

// Test that we can only query from the latest committed state.
Expand Down
3 changes: 2 additions & 1 deletion client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (
"path"
"strconv"

"github.com/cosmos/cosmos-sdk/cmd/gaia/app"
"github.com/tendermint/tendermint/libs/cli"

"github.com/cosmos/cosmos-sdk/cmd/gaia/app"

"github.com/pelletier/go-toml"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
7 changes: 4 additions & 3 deletions client/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ import (

"github.com/spf13/viper"

"github.com/cosmos/cosmos-sdk/client/keys"
cskeys "github.com/cosmos/cosmos-sdk/crypto/keys"
"github.com/cosmos/cosmos-sdk/types"
"github.com/tendermint/tendermint/libs/cli"
"github.com/tendermint/tendermint/libs/log"
tmlite "github.com/tendermint/tendermint/lite"
tmliteProxy "github.com/tendermint/tendermint/lite/proxy"
rpcclient "github.com/tendermint/tendermint/rpc/client"

"github.com/cosmos/cosmos-sdk/client/keys"
cskeys "github.com/cosmos/cosmos-sdk/crypto/keys"
"github.com/cosmos/cosmos-sdk/types"
)

const ctxAccStoreName = "acc"
Expand Down
3 changes: 2 additions & 1 deletion client/context/errors.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package context

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/pkg/errors"

sdk "github.com/cosmos/cosmos-sdk/types"
)

// ErrInvalidAccount returns a standardized error reflecting that a given
Expand Down
3 changes: 2 additions & 1 deletion client/context/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ import (

"strings"

"github.com/cosmos/cosmos-sdk/store"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto/merkle"
cmn "github.com/tendermint/tendermint/libs/common"
tmliteErr "github.com/tendermint/tendermint/lite/errors"
tmliteProxy "github.com/tendermint/tendermint/lite/proxy"
rpcclient "github.com/tendermint/tendermint/rpc/client"
tmtypes "github.com/tendermint/tendermint/types"

"github.com/cosmos/cosmos-sdk/store"
)

// GetNode returns an RPC client. If the context's client is not defined, an
Expand Down
3 changes: 2 additions & 1 deletion client/keys.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package client

import (
"github.com/cosmos/cosmos-sdk/crypto/keys"
dbm "github.com/tendermint/tendermint/libs/db"

"github.com/cosmos/cosmos-sdk/crypto/keys"
)

// GetKeyBase initializes a keybase based on the given db.
Expand Down
3 changes: 2 additions & 1 deletion client/keys/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ import (

"github.com/spf13/viper"

"github.com/gorilla/mux"

"github.com/cosmos/cosmos-sdk/client"
keys "github.com/cosmos/cosmos-sdk/crypto/keys"
keyerror "github.com/cosmos/cosmos-sdk/crypto/keys/keyerror"
"github.com/gorilla/mux"

"github.com/spf13/cobra"
)
Expand Down
3 changes: 2 additions & 1 deletion client/keys/mnemonic.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"crypto/sha256"
"fmt"

"github.com/cosmos/cosmos-sdk/client"
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"

bip39 "github.com/bartekn/go-bip39"
)

Expand Down
3 changes: 2 additions & 1 deletion client/keys/root.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package keys

import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/gorilla/mux"
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
)

// Commands registers a sub-tree of commands to interact with
Expand Down
8 changes: 5 additions & 3 deletions client/keys/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ import (
"fmt"
"net/http"

"github.com/cosmos/cosmos-sdk/crypto/keys"
"github.com/tendermint/tendermint/crypto"

"github.com/cosmos/cosmos-sdk/crypto/keys/keyerror"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/crypto/keys"

"github.com/gorilla/mux"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/tendermint/tendermint/crypto/multisig"
"github.com/tendermint/tendermint/libs/cli"

"github.com/cosmos/cosmos-sdk/crypto/keys/keyerror"
sdk "github.com/cosmos/cosmos-sdk/types"
)

const (
Expand Down
6 changes: 4 additions & 2 deletions client/keys/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import (
"fmt"
"net/http"

"github.com/gorilla/mux"

"github.com/cosmos/cosmos-sdk/client"
keys "github.com/cosmos/cosmos-sdk/crypto/keys"
"github.com/gorilla/mux"

"github.com/cosmos/cosmos-sdk/crypto/keys/keyerror"
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/crypto/keys/keyerror"
)

func updateKeyCommand() *cobra.Command {
Expand Down
9 changes: 5 additions & 4 deletions client/keys/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import (
"net/http"
"path/filepath"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/spf13/viper"
"github.com/syndtr/goleveldb/leveldb/opt"
"github.com/tendermint/tendermint/libs/cli"
dbm "github.com/tendermint/tendermint/libs/db"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/crypto/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
)

// KeyDBName is the directory under root where we store the keys
Expand Down
6 changes: 4 additions & 2 deletions client/keys/utils_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package keys

import (
"github.com/cosmos/cosmos-sdk/crypto/keys"
"github.com/stretchr/testify/require"
"io/ioutil"
"os"
"testing"

"github.com/stretchr/testify/require"

"github.com/cosmos/cosmos-sdk/crypto/keys"
)

func TestGetKeyBaseLocks(t *testing.T) {
Expand Down
13 changes: 7 additions & 6 deletions client/lcd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ import (
"net/http"
"os"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/keys"
"github.com/cosmos/cosmos-sdk/codec"
keybase "github.com/cosmos/cosmos-sdk/crypto/keys"
"github.com/cosmos/cosmos-sdk/server"
"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/tendermint/tendermint/libs/log"
rpcserver "github.com/tendermint/tendermint/rpc/lib/server"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/keys"
"github.com/cosmos/cosmos-sdk/codec"
keybase "github.com/cosmos/cosmos-sdk/crypto/keys"
"github.com/cosmos/cosmos-sdk/server"

// Import statik for light client stuff
_ "github.com/cosmos/cosmos-sdk/client/lcd/statik"
)
Expand Down
6 changes: 4 additions & 2 deletions client/lcd/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ import (
"strings"
"testing"

stakeTypes "github.com/cosmos/cosmos-sdk/x/stake/types"
"github.com/tendermint/tendermint/crypto/secp256k1"

stakeTypes "github.com/cosmos/cosmos-sdk/x/stake/types"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/keys"
"github.com/cosmos/cosmos-sdk/client/rpc"
Expand All @@ -33,7 +34,6 @@ import (
"github.com/spf13/viper"
"github.com/stretchr/testify/require"

txbuilder "github.com/cosmos/cosmos-sdk/x/auth/client/txbuilder"
abci "github.com/tendermint/tendermint/abci/types"
tmcfg "github.com/tendermint/tendermint/config"
"github.com/tendermint/tendermint/crypto"
Expand All @@ -48,6 +48,8 @@ import (
tmrpc "github.com/tendermint/tendermint/rpc/lib/server"
tmtypes "github.com/tendermint/tendermint/types"

txbuilder "github.com/cosmos/cosmos-sdk/x/auth/client/txbuilder"

authRest "github.com/cosmos/cosmos-sdk/x/auth/client/rest"
bankRest "github.com/cosmos/cosmos-sdk/x/bank/client/rest"
govRest "github.com/cosmos/cosmos-sdk/x/gov/client/rest"
Expand Down
3 changes: 2 additions & 1 deletion client/rpc/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ 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
Expand Down
3 changes: 2 additions & 1 deletion client/rpc/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"

"github.com/spf13/viper"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/spf13/viper"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions client/rpc/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (

"github.com/spf13/cobra"

"github.com/spf13/viper"
ctypes "github.com/tendermint/tendermint/rpc/core/types"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/utils"
"github.com/spf13/viper"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
)

// StatusCommand returns the status of the network
Expand Down
5 changes: 3 additions & 2 deletions client/rpc/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import (
"github.com/gorilla/mux"
"github.com/spf13/cobra"

"github.com/spf13/viper"
tmtypes "github.com/tendermint/tendermint/types"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/utils"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/spf13/viper"
tmtypes "github.com/tendermint/tendermint/types"
)

// TODO these next two functions feel kinda hacky based on their placement
Expand Down
3 changes: 2 additions & 1 deletion client/tx/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package tx
import (
"net/http"

"io/ioutil"

"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/utils"
"github.com/cosmos/cosmos-sdk/codec"
"io/ioutil"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion client/tx/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import (
abci "github.com/tendermint/tendermint/abci/types"
ctypes "github.com/tendermint/tendermint/rpc/core/types"

"github.com/spf13/viper"

"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"
)

// QueryTxCmd implements the default command for a tx query.
Expand Down
5 changes: 3 additions & 2 deletions client/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import (
"io"
"os"

"github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/libs/common"

"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth"
authtxb "github.com/cosmos/cosmos-sdk/x/auth/client/txbuilder"
"github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/libs/common"
)

// CompleteAndBroadcastTxCli implements a utility function that facilitates
Expand Down
5 changes: 3 additions & 2 deletions client/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"errors"
"testing"

"github.com/cosmos/cosmos-sdk/cmd/gaia/app"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/assert"
"github.com/tendermint/tendermint/libs/common"

"github.com/cosmos/cosmos-sdk/cmd/gaia/app"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func TestParseQueryResponse(t *testing.T) {
Expand Down
Loading

0 comments on commit 24a1670

Please sign in to comment.