Skip to content

Commit

Permalink
Update to go 1.21 (#169)
Browse files Browse the repository at this point in the history
* Updated go version to 1.21

* Removed build folder
  • Loading branch information
lxgr-linux authored Oct 15, 2023
1 parent 18e6955 commit d6cee49
Show file tree
Hide file tree
Showing 22 changed files with 168 additions and 25 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/DecentralCardGame/Cardchain

go 1.20
go 1.21

require (
cosmossdk.io/errors v1.0.0-beta.7
Expand Down
138 changes: 138 additions & 0 deletions go.sum

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion scripts/requester/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/DecentralCardGame/scripts/requester

go 1.20
go 1.21

toolchain go1.21.3

replace github.com/DecentralCardGame/Cardchain => ../../../Cardchain

Expand Down
3 changes: 3 additions & 0 deletions scripts/requester/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
github.com/aws/aws-sdk-go v1.40.45 h1:QN1nsY27ssD/JmW4s83qmSb+uL6DG4GmCDzjmJB4xUI=
github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
github.com/aws/aws-sdk-go-v2 v1.9.1 h1:ZbovGV/qo40nrOJ4q8G33AGICzaPI45FHQWJ9650pF4=
github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4=
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1 h1:w/fPGB0t5rWwA43mux4e9ozFSH5zF1moQemlA131PWc=
Expand Down Expand Up @@ -1193,6 +1194,7 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-getter v1.6.1 h1:NASsgP4q6tL94WH6nJxKWj8As2H/2kop/bB1d8JMyRY=
github.com/hashicorp/go-getter v1.6.1/go.mod h1:IZCrswsZPeWv9IkVnLElzRU/gz/QPi6pZHn4tv6vbwA=
github.com/hashicorp/go-getter v1.7.0/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744=
github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM=
github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
Expand Down Expand Up @@ -1734,6 +1736,7 @@ github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 h1:3SVOIvH7Ae1KRYy
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ=
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iLA=
github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA=
github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI=
Expand Down
4 changes: 2 additions & 2 deletions x/cardchain/client/cli/tx_set_card_rarity.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ func CmdSetCardRarity() *cobra.Command {
return err
}
rar, found := types.CardRarity_value[args[2]]
if (!found) {
return fmt.Errorf("Rarity has to be in %s", maps.Keys(types.CardRarity_value))
if !found {
return fmt.Errorf("rarity has to be in %s", maps.Keys(types.CardRarity_value))
}

argRarity := types.CardRarity(rar)
Expand Down
3 changes: 2 additions & 1 deletion x/cardchain/keeper/arrays.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package keeper

import (
"slices"

"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
"golang.org/x/exp/slices"
)

func PopItemFromArr[E comparable](item E, arr []E) ([]E, error) {
Expand Down
2 changes: 1 addition & 1 deletion x/cardchain/keeper/grpc_query_q_cards.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package keeper
import (
"context"
"encoding/json"
"slices"
"sort"
"strconv"
"strings"
Expand All @@ -13,7 +14,6 @@ import (
"github.com/DecentralCardGame/cardobject/keywords"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/errors"
"golang.org/x/exp/slices"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
3 changes: 1 addition & 2 deletions x/cardchain/keeper/grpc_query_q_matches.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ package keeper

import (
"context"

"golang.org/x/exp/slices"
"slices"

"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
2 changes: 1 addition & 1 deletion x/cardchain/keeper/grpc_query_q_sets.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package keeper

import (
"context"
"slices"

"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"golang.org/x/exp/slices"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
2 changes: 1 addition & 1 deletion x/cardchain/keeper/match.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package keeper

import (
"fmt"
"slices"
"time"

sdkerrors "cosmossdk.io/errors"
"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/errors"
"golang.org/x/exp/slices"
)

// SetMatchReporter Makes a user a match reporter
Expand Down
2 changes: 1 addition & 1 deletion x/cardchain/keeper/msg_server_add_card_to_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package keeper

import (
"context"
"slices"

sdkerrors "cosmossdk.io/errors"
"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/errors"
"golang.org/x/exp/slices"
)

func (k msgServer) AddCardToSet(goCtx context.Context, msg *types.MsgAddCardToSet) (*types.MsgAddCardToSetResponse, error) {
Expand Down
2 changes: 1 addition & 1 deletion x/cardchain/keeper/msg_server_add_contributor_to_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package keeper

import (
"context"
"slices"

sdkerrors "cosmossdk.io/errors"
"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/errors"
"golang.org/x/exp/slices"
)

func (k msgServer) AddContributorToSet(goCtx context.Context, msg *types.MsgAddContributorToSet) (*types.MsgAddContributorToSetResponse, error) {
Expand Down
2 changes: 1 addition & 1 deletion x/cardchain/keeper/msg_server_commit_council_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package keeper

import (
"context"
"slices"

sdkerrors "cosmossdk.io/errors"
"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/errors"
"golang.org/x/exp/slices"
)

func (k msgServer) CommitCouncilResponse(goCtx context.Context, msg *types.MsgCommitCouncilResponse) (*types.MsgCommitCouncilResponseResponse, error) {
Expand Down
3 changes: 1 addition & 2 deletions x/cardchain/keeper/msg_server_open_booster_pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package keeper
import (
"context"
"math/rand"

"golang.org/x/exp/slices"
"slices"

sdkerrors "cosmossdk.io/errors"
"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
Expand Down
2 changes: 1 addition & 1 deletion x/cardchain/keeper/msg_server_remove_card_from_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package keeper

import (
"context"
"slices"

sdkerrors "cosmossdk.io/errors"
"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/errors"
"golang.org/x/exp/slices"
)

func (k msgServer) RemoveCardFromSet(goCtx context.Context, msg *types.MsgRemoveCardFromSet) (*types.MsgRemoveCardFromSetResponse, error) {
Expand Down
2 changes: 1 addition & 1 deletion x/cardchain/keeper/msg_server_reveal_council_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package keeper

import (
"context"
"slices"

sdkerrors "cosmossdk.io/errors"
"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/errors"
"golang.org/x/exp/slices"
)

func (k msgServer) RevealCouncilResponse(goCtx context.Context, msg *types.MsgRevealCouncilResponse) (*types.MsgRevealCouncilResponseResponse, error) {
Expand Down
2 changes: 1 addition & 1 deletion x/cardchain/keeper/msg_server_set_card_rarity.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package keeper

import (
"context"
"slices"

sdkerrors "cosmossdk.io/errors"
"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors2 "github.com/cosmos/cosmos-sdk/types/errors"
"golang.org/x/exp/slices"
)

func (k msgServer) SetCardRarity(goCtx context.Context, msg *types.MsgSetCardRarity) (*types.MsgSetCardRarityResponse, error) {
Expand Down
2 changes: 1 addition & 1 deletion x/cardchain/keeper/msg_server_set_profile_card.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package keeper

import (
"context"
"slices"

sdkerrors "cosmossdk.io/errors"
"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/errors"
"golang.org/x/exp/slices"
)

func (k msgServer) SetProfileCard(goCtx context.Context, msg *types.MsgSetProfileCard) (*types.MsgSetProfileCardResponse, error) {
Expand Down
2 changes: 1 addition & 1 deletion x/cardchain/keeper/msg_server_transfer_booster_pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package keeper

import (
"context"
"slices"

sdkerrors "cosmossdk.io/errors"
"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"golang.org/x/exp/slices"
)

func (k msgServer) TransferBoosterPack(goCtx context.Context, msg *types.MsgTransferBoosterPack) (*types.MsgTransferBoosterPackResponse, error) {
Expand Down
3 changes: 2 additions & 1 deletion x/cardchain/keeper/vote_right.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package keeper

import (
"slices"

"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"golang.org/x/exp/slices"
)

// GetVoteReward Calculates winner rewards
Expand Down
5 changes: 2 additions & 3 deletions x/cardchain/keeper/voting.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ package keeper

import (
"fmt"

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

sdkerrors "cosmossdk.io/errors"
"github.com/DecentralCardGame/Cardchain/x/cardchain/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"golang.org/x/exp/slices"
"github.com/cosmos/cosmos-sdk/types/errors"
)

func (k Keeper) voteCard(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package generic_type_keeper

import (
"slices"

"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"golang.org/x/exp/slices"
)

type KeywordedGenericTypeKeeper[T codec.ProtoMarshaler] struct {
Expand Down

0 comments on commit d6cee49

Please sign in to comment.