Skip to content

Commit

Permalink
fix(lint): reapply good gci import order
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Jun 19, 2023
1 parent fe19886 commit 765a2ed
Show file tree
Hide file tree
Showing 83 changed files with 234 additions and 178 deletions.
25 changes: 13 additions & 12 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ import (
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/ignite/cli/ignite/pkg/openapiconsole"
appparams "github.com/okp4/okp4d/app/params"
okp4wasm "github.com/okp4/okp4d/app/wasm"
"github.com/okp4/okp4d/docs"
logicmodule "github.com/okp4/okp4d/x/logic"
logicfs "github.com/okp4/okp4d/x/logic/fs"
logicmodulekeeper "github.com/okp4/okp4d/x/logic/keeper"
logicmoduletypes "github.com/okp4/okp4d/x/logic/types"
"github.com/okp4/okp4d/x/mint"
mintkeeper "github.com/okp4/okp4d/x/mint/keeper"
minttypes "github.com/okp4/okp4d/x/mint/types"
"github.com/okp4/okp4d/x/vesting"
vestingtypes "github.com/okp4/okp4d/x/vesting/types"
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/cast"

Expand Down Expand Up @@ -133,6 +121,19 @@ import (
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
solomachine "github.com/cosmos/ibc-go/v7/modules/light-clients/06-solomachine"
ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint"

appparams "github.com/okp4/okp4d/app/params"
okp4wasm "github.com/okp4/okp4d/app/wasm"
"github.com/okp4/okp4d/docs"
logicmodule "github.com/okp4/okp4d/x/logic"
logicfs "github.com/okp4/okp4d/x/logic/fs"
logicmodulekeeper "github.com/okp4/okp4d/x/logic/keeper"
logicmoduletypes "github.com/okp4/okp4d/x/logic/types"
"github.com/okp4/okp4d/x/mint"
mintkeeper "github.com/okp4/okp4d/x/mint/keeper"
minttypes "github.com/okp4/okp4d/x/mint/types"
"github.com/okp4/okp4d/x/vesting"
vestingtypes "github.com/okp4/okp4d/x/vesting/types"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions app/encoding.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package app

import (
"github.com/okp4/okp4d/app/params"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/std"
"github.com/cosmos/cosmos-sdk/x/auth/tx"

"github.com/okp4/okp4d/app/params"
)

// makeEncodingConfig creates an EncodingConfig for an amino based test configuration.
Expand Down
6 changes: 3 additions & 3 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package app
import (
"fmt"

storetypes "github.com/cosmos/cosmos-sdk/store/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

v4 "github.com/okp4/okp4d/app/upgrades/v4"
v41 "github.com/okp4/okp4d/app/upgrades/v41"
v5 "github.com/okp4/okp4d/app/upgrades/v5"

storetypes "github.com/cosmos/cosmos-sdk/store/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func (app *App) setupUpgradeHandlers() {
Expand Down
5 changes: 3 additions & 2 deletions app/wasm/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
logickeeper "github.com/okp4/okp4d/x/logic/keeper"
logicwasm "github.com/okp4/okp4d/x/logic/wasm"

errorsmod "cosmossdk.io/errors"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

logickeeper "github.com/okp4/okp4d/x/logic/keeper"
logicwasm "github.com/okp4/okp4d/x/logic/wasm"
)

// customQuery represents the wasm custom query structure, it is intended to allow wasm contracts to execute queries
Expand Down
4 changes: 2 additions & 2 deletions cmd/okp4d/cmd/config.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cmd

import (
"github.com/okp4/okp4d/app"

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

"github.com/okp4/okp4d/app"
)

func initSDKConfig() {
Expand Down
3 changes: 2 additions & 1 deletion cmd/okp4d/cmd/genaccounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"

authvesting "github.com/okp4/okp4d/x/vesting/types"
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
Expand All @@ -18,6 +17,8 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/cosmos/cosmos-sdk/x/genutil"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"

authvesting "github.com/okp4/okp4d/x/vesting/types"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions cmd/okp4d/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"path/filepath"
"strings"

"github.com/okp4/okp4d/app"
appparams "github.com/okp4/okp4d/app/params"
"github.com/spf13/cast"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
Expand Down Expand Up @@ -40,6 +38,9 @@ import (
"github.com/cosmos/cosmos-sdk/x/genutil"
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"

"github.com/okp4/okp4d/app"
appparams "github.com/okp4/okp4d/app/params"
)

// NewRootCmd creates a new root command for a Cosmos SDK application.
Expand Down
6 changes: 3 additions & 3 deletions cmd/okp4d/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"errors"
"os"

"github.com/okp4/okp4d/app"
"github.com/okp4/okp4d/cmd/okp4d/cmd"

"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

"github.com/okp4/okp4d/app"
"github.com/okp4/okp4d/cmd/okp4d/cmd"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion scripts/generate_command_doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"log"
"os"

"github.com/okp4/okp4d/cmd/okp4d/cmd"
"github.com/spf13/cobra/doc"

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

"github.com/okp4/okp4d/cmd/okp4d/cmd"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion testutil/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"testing"
"time"

"github.com/okp4/okp4d/app"
"github.com/stretchr/testify/require"

tmdb "github.com/cometbft/cometbft-db"
Expand All @@ -20,6 +19,8 @@ import (
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

"github.com/okp4/okp4d/app"
)

type (
Expand Down
3 changes: 2 additions & 1 deletion x/logic/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package cli
import (
"fmt"

"github.com/okp4/okp4d/x/logic/types"
"github.com/spf13/cobra"

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

"github.com/okp4/okp4d/x/logic/types"
)

// GetQueryCmd returns the cli query commands for this module.
Expand Down
3 changes: 2 additions & 1 deletion x/logic/client/cli/query_ask.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import (
"io"
"os"

"github.com/okp4/okp4d/x/logic/types"
"github.com/spf13/cobra"

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

"github.com/okp4/okp4d/x/logic/types"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion x/logic/client/cli/query_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package cli
import (
"context"

"github.com/okp4/okp4d/x/logic/types"
"github.com/spf13/cobra"

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

"github.com/okp4/okp4d/x/logic/types"
)

func CmdQueryParams() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion x/logic/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"fmt"
"time"

"github.com/okp4/okp4d/x/logic/types"
"github.com/spf13/cobra"

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

"github.com/okp4/okp4d/x/logic/types"
)

var DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds())
Expand Down
5 changes: 3 additions & 2 deletions x/logic/fs/filtered_fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import (
"time"

"github.com/golang/mock/gomock"
"github.com/okp4/okp4d/x/logic/testutil"
"github.com/okp4/okp4d/x/logic/util"
"github.com/samber/lo"

. "github.com/smartystreets/goconvey/convey"

"github.com/okp4/okp4d/x/logic/testutil"
"github.com/okp4/okp4d/x/logic/util"
)

func TestSourceFile(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions x/logic/fs/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"net/url"
"strings"

"github.com/okp4/okp4d/x/logic/types"

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

"github.com/okp4/okp4d/x/logic/types"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion x/logic/fs/wasm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"testing"

"github.com/golang/mock/gomock"
"github.com/okp4/okp4d/x/logic/testutil"

. "github.com/smartystreets/goconvey/convey"

Expand All @@ -19,6 +18,8 @@ import (

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

"github.com/okp4/okp4d/x/logic/testutil"
)

func TestWasmHandler(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions x/logic/genesis.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package logic

import (
"github.com/okp4/okp4d/x/logic/keeper"
"github.com/okp4/okp4d/x/logic/types"

errorsmod "cosmossdk.io/errors"

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

"github.com/okp4/okp4d/x/logic/keeper"
"github.com/okp4/okp4d/x/logic/types"
)

// InitGenesis initializes the module's state from a provided genesis state.
Expand Down
3 changes: 2 additions & 1 deletion x/logic/interpreter/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (

"github.com/ichiban/prolog"
"github.com/ichiban/prolog/engine"
"github.com/okp4/okp4d/x/logic/predicate"

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

"github.com/okp4/okp4d/x/logic/predicate"
)

// registry is a map from predicate names (in the form of "atom/arity") to predicates functions.
Expand Down
6 changes: 3 additions & 3 deletions x/logic/keeper/grpc_query_ask.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package keeper
import (
goctx "context"

"github.com/okp4/okp4d/x/logic/meter"
"github.com/okp4/okp4d/x/logic/types"

errorsmod "cosmossdk.io/errors"

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

"github.com/okp4/okp4d/x/logic/meter"
"github.com/okp4/okp4d/x/logic/types"
)

func (k Keeper) Ask(ctx goctx.Context, req *types.QueryServiceAskRequest) (response *types.QueryServiceAskResponse, err error) {
Expand Down
9 changes: 5 additions & 4 deletions x/logic/keeper/grpc_query_ask_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ import (
"testing"

"github.com/golang/mock/gomock"
"github.com/okp4/okp4d/x/logic"
"github.com/okp4/okp4d/x/logic/keeper"
logictestutil "github.com/okp4/okp4d/x/logic/testutil"
"github.com/okp4/okp4d/x/logic/types"

. "github.com/smartystreets/goconvey/convey"

Expand All @@ -20,6 +16,11 @@ import (
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

"github.com/okp4/okp4d/x/logic"
"github.com/okp4/okp4d/x/logic/keeper"
logictestutil "github.com/okp4/okp4d/x/logic/testutil"
"github.com/okp4/okp4d/x/logic/types"
)

func TestGRPCAsk(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion x/logic/keeper/grpc_query_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package keeper
import (
"context"

"github.com/okp4/okp4d/x/logic/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

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

"github.com/okp4/okp4d/x/logic/types"
)

func (k Keeper) Params(c context.Context, req *types.QueryServiceParamsRequest) (*types.QueryServiceParamsResponse, error) {
Expand Down
9 changes: 5 additions & 4 deletions x/logic/keeper/grpc_query_params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ import (
"testing"

"github.com/golang/mock/gomock"
"github.com/okp4/okp4d/x/logic"
"github.com/okp4/okp4d/x/logic/keeper"
logictestutil "github.com/okp4/okp4d/x/logic/testutil"
"github.com/okp4/okp4d/x/logic/types"

. "github.com/smartystreets/goconvey/convey"

Expand All @@ -22,6 +18,11 @@ import (
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

"github.com/okp4/okp4d/x/logic"
"github.com/okp4/okp4d/x/logic/keeper"
logictestutil "github.com/okp4/okp4d/x/logic/testutil"
"github.com/okp4/okp4d/x/logic/types"
)

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

0 comments on commit 765a2ed

Please sign in to comment.