diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index ded674f6..207c5ee7 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -41,7 +41,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.21.x" + go-version: "1.22.x" cache: false - name: Install gitlint run: | @@ -63,7 +63,7 @@ jobs: # 'make lint-go'. uses: golangci/golangci-lint-action@v6.1.0 with: - version: v1.55 + version: v1.56 # Always run this step so that all linting errors can be seen at once. if: always() - name: Ensure a clean code checkout diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 30d425c9..9f5a640a 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.21.x" + go-version: "1.22.x" - name: Cache Go dependencies uses: actions/cache@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db73c02a..19d8a106 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.21.x" + go-version: "1.22.x" - name: Install GoReleaser uses: goreleaser/goreleaser-action@v5 with: diff --git a/.golangci.yml b/.golangci.yml index 7689e849..d77513ca 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -72,6 +72,7 @@ linters-settings: - github.com/zondax/ledger-go - github.com/foxboron/go-uefi/authenticode - golang.org/x/text + - gopkg.in/yaml.v3 exhaustive: # Switch statements are to be considered exhaustive if a 'default' case is # present, even if all enum members aren't listed in the switch. diff --git a/cmd/account/show/show.go b/cmd/account/show/show.go index 1234e6a5..e4effb49 100644 --- a/cmd/account/show/show.go +++ b/cmd/account/show/show.go @@ -30,7 +30,7 @@ var ( Short: "Show balance and other information", Aliases: []string{"s"}, Args: cobra.MaximumNArgs(1), - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { cfg := cliConfig.Global() npa := common.GetNPASelection(cfg) diff --git a/cmd/network/governance/vote.go b/cmd/network/governance/vote.go index 1fd7d6ad..b3173678 100644 --- a/cmd/network/governance/vote.go +++ b/cmd/network/governance/vote.go @@ -18,7 +18,7 @@ var govCastVoteCmd = &cobra.Command{ Use: "cast-vote { yes | no | abstain }", Short: "Cast a governance vote on a proposal", Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { cfg := cliConfig.Global() npa := common.GetNPASelection(cfg) txCfg := common.GetTransactionConfig() diff --git a/cmd/paratime/denomination/remove.go b/cmd/paratime/denomination/remove.go index e5d8e293..2088f29a 100644 --- a/cmd/paratime/denomination/remove.go +++ b/cmd/paratime/denomination/remove.go @@ -15,7 +15,7 @@ var removeDenomCmd = &cobra.Command{ Use: "remove ", Short: "Remove denomination", Args: cobra.ExactArgs(3), - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { cfg := cliConfig.Global() networkArg, ptArg, denomArg := args[0], args[1], args[2] diff --git a/cmd/paratime/denomination/set-native.go b/cmd/paratime/denomination/set-native.go index 40ea4887..0df8f335 100644 --- a/cmd/paratime/denomination/set-native.go +++ b/cmd/paratime/denomination/set-native.go @@ -15,7 +15,7 @@ var setNativeDenomCmd = &cobra.Command{ Use: "set-native ", Short: "Set native denomination", Args: cobra.ExactArgs(4), - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { cfg := cliConfig.Global() networkArg, ptArg, symbolArg, decimalsArg := args[0], args[1], args[2], args[3] diff --git a/cmd/paratime/denomination/set.go b/cmd/paratime/denomination/set.go index 07fa0220..988c2db1 100644 --- a/cmd/paratime/denomination/set.go +++ b/cmd/paratime/denomination/set.go @@ -19,7 +19,7 @@ var ( Use: "set [--symbol ]", Short: "Set denomination", Args: cobra.ExactArgs(4), - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { cfg := cliConfig.Global() networkArg, ptArg, denomArg, decimalsArg := args[0], args[1], args[2], args[3] diff --git a/cmd/paratime/register.go b/cmd/paratime/register.go index 85d7f877..63aef4a7 100644 --- a/cmd/paratime/register.go +++ b/cmd/paratime/register.go @@ -18,7 +18,7 @@ var registerCmd = &cobra.Command{ Use: "register ", Short: "Register a new ParaTime or update an existing one", Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { cfg := cliConfig.Global() npa := common.GetNPASelection(cfg) txCfg := common.GetTransactionConfig() diff --git a/cmd/paratime/remove.go b/cmd/paratime/remove.go index 49bb32d6..81f9e9e9 100644 --- a/cmd/paratime/remove.go +++ b/cmd/paratime/remove.go @@ -13,7 +13,7 @@ var removeCmd = &cobra.Command{ Aliases: []string{"rm"}, Short: "Remove an existing ParaTime", Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { cfg := cliConfig.Global() network, name := args[0], args[1] diff --git a/cmd/paratime/set_default.go b/cmd/paratime/set_default.go index 062c151d..45958bfd 100644 --- a/cmd/paratime/set_default.go +++ b/cmd/paratime/set_default.go @@ -12,7 +12,7 @@ var setDefaultCmd = &cobra.Command{ Use: "set-default ", Short: "Sets the given ParaTime as the default ParaTime for the given network", Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { cfg := cliConfig.Global() network, name := args[0], args[1] diff --git a/cmd/rofl/build/sgx.go b/cmd/rofl/build/sgx.go index 9b3c08da..df9eea16 100644 --- a/cmd/rofl/build/sgx.go +++ b/cmd/rofl/build/sgx.go @@ -34,7 +34,7 @@ var ( Use: "sgx", Short: "Build an SGX-based Rust ROFL application", Args: cobra.NoArgs, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { cfg := cliConfig.Global() npa := common.GetNPASelection(cfg) diff --git a/cmd/rofl/build/tdx.go b/cmd/rofl/build/tdx.go index 2ce21a2a..bdcb5bc8 100644 --- a/cmd/rofl/build/tdx.go +++ b/cmd/rofl/build/tdx.go @@ -50,7 +50,7 @@ var ( Use: "tdx", Short: "Build a TDX-based ROFL application", Args: cobra.NoArgs, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { cfg := cliConfig.Global() npa := common.GetNPASelection(cfg) diff --git a/cmd/wallet/create.go b/cmd/wallet/create.go index 5fdfcf1a..b2cb74eb 100644 --- a/cmd/wallet/create.go +++ b/cmd/wallet/create.go @@ -18,7 +18,7 @@ var createCmd = &cobra.Command{ Use: "create ", Short: "Create a new account", Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { cfg := config.Global() name := args[0] diff --git a/cmd/wallet/set_default.go b/cmd/wallet/set_default.go index 5121bc05..10218168 100644 --- a/cmd/wallet/set_default.go +++ b/cmd/wallet/set_default.go @@ -10,7 +10,7 @@ var setDefaultCmd = &cobra.Command{ Use: "set-default ", Short: "Sets the given account as the default account", Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, args []string) { cfg := config.Global() name := args[0] diff --git a/wallet/wallet.go b/wallet/wallet.go index 58b8d412..205e2993 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -173,7 +173,7 @@ func Load(kind string) (Factory, error) { // AvailableKinds returns all of the available account factories. func AvailableKinds() []Factory { var kinds []Factory - registeredFactories.Range(func(key, value interface{}) bool { + registeredFactories.Range(func(_, value interface{}) bool { kinds = append(kinds, value.(Factory)) return true })