aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/consolecmd.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-06-10 16:23:00 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-06-10 16:23:00 +0800
commit90e07b19abaa950eaaff2eecc4918b1d16ebbcaf (patch)
treec742c17da28dc67f41d9779eec0bc3427432e044 /cmd/geth/consolecmd.go
parent63d1d145e2b2c8db4106d87767842019492e0aea (diff)
downloadgo-tangerine-90e07b19abaa950eaaff2eecc4918b1d16ebbcaf.tar.gz
go-tangerine-90e07b19abaa950eaaff2eecc4918b1d16ebbcaf.tar.zst
go-tangerine-90e07b19abaa950eaaff2eecc4918b1d16ebbcaf.zip
cmd: fix CLI package deprecation warnings
Diffstat (limited to 'cmd/geth/consolecmd.go')
-rw-r--r--cmd/geth/consolecmd.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/cmd/geth/consolecmd.go b/cmd/geth/consolecmd.go
index cc7a40fd9..257050a62 100644
--- a/cmd/geth/consolecmd.go
+++ b/cmd/geth/consolecmd.go
@@ -60,7 +60,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
// localConsole starts a new geth node, attaching a JavaScript console to it at the
// same time.
-func localConsole(ctx *cli.Context) {
+func localConsole(ctx *cli.Context) error {
// Create and start the node based on the CLI flags
node := utils.MakeSystemNode(clientIdentifier, verString, relConfig, makeDefaultExtra(), ctx)
startNode(ctx, node)
@@ -86,16 +86,18 @@ func localConsole(ctx *cli.Context) {
// If only a short execution was requested, evaluate and return
if script := ctx.GlobalString(utils.ExecFlag.Name); script != "" {
console.Evaluate(script)
- return
+ return nil
}
// Otherwise print the welcome screen and enter interactive mode
console.Welcome()
console.Interactive()
+
+ return nil
}
// remoteConsole will connect to a remote geth instance, attaching a JavaScript
// console to it.
-func remoteConsole(ctx *cli.Context) {
+func remoteConsole(ctx *cli.Context) error {
// Attach to a remotely running geth instance and start the JavaScript console
client, err := utils.NewRemoteRPCClient(ctx)
if err != nil {
@@ -116,17 +118,19 @@ func remoteConsole(ctx *cli.Context) {
// If only a short execution was requested, evaluate and return
if script := ctx.GlobalString(utils.ExecFlag.Name); script != "" {
console.Evaluate(script)
- return
+ return nil
}
// Otherwise print the welcome screen and enter interactive mode
console.Welcome()
console.Interactive()
+
+ return nil
}
// ephemeralConsole starts a new geth node, attaches an ephemeral JavaScript
// console to it, and each of the files specified as arguments and tears the
// everything down.
-func ephemeralConsole(ctx *cli.Context) {
+func ephemeralConsole(ctx *cli.Context) error {
// Create and start the node based on the CLI flags
node := utils.MakeSystemNode(clientIdentifier, verString, relConfig, makeDefaultExtra(), ctx)
startNode(ctx, node)
@@ -164,4 +168,6 @@ func ephemeralConsole(ctx *cli.Context) {
os.Exit(0)
}()
console.Stop(true)
+
+ return nil
}