* mainly sdk.int to cosmossdk.io/math * staking keys * fumpt * var-naming linter errors and a fumpt * Update CHANGELOG.md * Update .golangci.yml * Update CHANGELOG.md * Update test_helpers.go * Update test_helpers.go * fumpt and lint * this lints the db module, and makes it easier to use. It adds breaking name changes * DBConnection -> Connection * previous commit contained a merge error * Update test_helpers.go * Update test_helpers.go * db renamings * merge master * changelog * DBWriter -> Writer * consistent multistore reciever * standard recievers for multistore v2alpha1 * general cleanup of linting issues * more linter fixes * remove prealloc linter * nolint the secp256k1 import * nolint the secp256k1 package * completenolint resulting in a diff that has only nolints
35 lines
932 B
Go
35 lines
932 B
Go
package cli
|
|
|
|
import (
|
|
"github.com/cosmos/cosmos-sdk/x/gov/client/cli"
|
|
gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
|
"github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
|
"github.com/spf13/pflag"
|
|
)
|
|
|
|
func parseArgsToContent(fs *pflag.FlagSet, name string) (gov.Content, error) {
|
|
title, err := fs.GetString(cli.FlagTitle) //nolint:staticcheck // we are intentionally using a deprecated flag here.
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
description, err := fs.GetString(cli.FlagDescription) //nolint:staticcheck // we are intentionally using a deprecated flag here.
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
height, err := fs.GetInt64(FlagUpgradeHeight)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
info, err := fs.GetString(FlagUpgradeInfo)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
plan := types.Plan{Name: name, Height: height, Info: info}
|
|
content := types.NewSoftwareUpgradeProposal(title, description, plan)
|
|
return content, nil
|
|
}
|