Squash various linter warnings (#5652)

Closes: #5651
This commit is contained in:
Alessio Treglia
2020-02-16 20:06:45 +01:00
committed by GitHub
parent 05c21a534a
commit c77bb7b038
6 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ const (
)
// ExportCmd dumps app state to JSON.
func ExportCmd(ctx *Context, cdc *codec.Codec, appExporter AppExporter) *cobra.Command {
func ExportCmd(ctx *Context, cdc codec.JSONMarshaler, appExporter AppExporter) *cobra.Command {
cmd := &cobra.Command{
Use: "export",
Short: "Export state to JSON",
+2 -2
View File
@@ -118,7 +118,7 @@ func interceptLoadConfig() (conf *cfg.Config, err error) {
// add server commands
func AddCommands(
ctx *Context, cdc *codec.Codec,
ctx *Context, cdc codec.JSONMarshaler,
rootCmd *cobra.Command,
appCreator AppCreator, appExport AppExporter) {
@@ -154,7 +154,7 @@ func AddCommands(
//
// NOTE: The ordering of the keys returned as the resulting JSON message is
// non-deterministic, so the client should not rely on key ordering.
func InsertKeyJSON(cdc *codec.Codec, baseJSON []byte, key string, value json.RawMessage) ([]byte, error) {
func InsertKeyJSON(cdc codec.JSONMarshaler, baseJSON []byte, key string, value json.RawMessage) ([]byte, error) {
var jsonMap map[string]json.RawMessage
if err := cdc.UnmarshalJSON(baseJSON, &jsonMap); err != nil {