-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R4R: Reorganize CLI command structure. #2728
Changes from 5 commits
d4fb6d4
c20e383
cade5f5
0ab5d76
1aae086
8f4c7df
0ff12bb
6c261ee
ac8f2da
17c119d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,20 @@ package client | |
import ( | ||
"bufio" | ||
"fmt" | ||
"io/ioutil" | ||
"os" | ||
"path" | ||
|
||
"github.com/cosmos/cosmos-sdk/types" | ||
"github.com/mitchellh/go-homedir" | ||
"github.com/pelletier/go-toml" | ||
"github.com/spf13/cobra" | ||
"io/ioutil" | ||
"os" | ||
"path" | ||
) | ||
|
||
type cliConfig struct { | ||
Home string `toml:"home"` | ||
ChainID string `toml:"chain_id"` | ||
TrustNode bool `toml:"trust_node"` | ||
Encoding string `toml:"encoding"` | ||
Output string `toml:"output"` | ||
Node string `toml:"node"` | ||
Trace bool `toml:"trace"` | ||
|
@@ -41,23 +41,25 @@ func runConfigCmd(cmd *cobra.Command, args []string) error { | |
} | ||
|
||
stdin := BufferStdin() | ||
|
||
gaiaCLIHome, err := handleGaiaCLIHome(home, stdin) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
node, err := handleNode(stdin) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
trustNode, err := handleTrustNode(stdin) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
encoding := "btc" | ||
output := "text" | ||
var chainID string | ||
chainID, err = types.DefaultChainID() | ||
// var chainID string | ||
chainID, err := types.DefaultChainID() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ++ |
||
|
||
if err != nil { | ||
fmt.Println("Couldn't populate ChainID, so using an empty one.") | ||
} | ||
|
@@ -66,8 +68,7 @@ func runConfigCmd(cmd *cobra.Command, args []string) error { | |
Home: gaiaCLIHome, | ||
ChainID: chainID, | ||
TrustNode: trustNode, | ||
Encoding: encoding, | ||
Output: output, | ||
Output: "text", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's please create and use a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This whole functionality is currently broken. I'll open an issue for that and fix it in another PR if thats OK. |
||
Node: node, | ||
Trace: false, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's delete this comment?