aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorferhat elmas <elmas.ferhat@gmail.com>2017-11-11 01:06:45 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-11-11 01:06:45 +0800
commit86f6568f6618945b19057553ec32690d723da982 (patch)
treeea7d9f92f3bcf5af22be1edfdbb302b5a5161f14 /cmd
parent3ee86a57f328530707974288e9db87b7c05283f9 (diff)
downloadgo-tangerine-86f6568f6618945b19057553ec32690d723da982.tar
go-tangerine-86f6568f6618945b19057553ec32690d723da982.tar.gz
go-tangerine-86f6568f6618945b19057553ec32690d723da982.tar.bz2
go-tangerine-86f6568f6618945b19057553ec32690d723da982.tar.lz
go-tangerine-86f6568f6618945b19057553ec32690d723da982.tar.xz
go-tangerine-86f6568f6618945b19057553ec32690d723da982.tar.zst
go-tangerine-86f6568f6618945b19057553ec32690d723da982.zip
build: enable unconvert linter (#15456)
* build: enable unconvert linter - fixes #15453 - update code base for failing cases * cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
Diffstat (limited to 'cmd')
-rw-r--r--cmd/puppeth/module_faucet.go2
-rw-r--r--cmd/puppeth/module_node.go2
-rw-r--r--cmd/puppeth/ssh.go3
-rw-r--r--cmd/puppeth/wizard.go3
4 files changed, 4 insertions, 6 deletions
diff --git a/cmd/puppeth/module_faucet.go b/cmd/puppeth/module_faucet.go
index acf1e4324..3c1296bdd 100644
--- a/cmd/puppeth/module_faucet.go
+++ b/cmd/puppeth/module_faucet.go
@@ -133,7 +133,7 @@ func deployFaucet(client *sshClient, network string, bootnodes []string, config
})
files[filepath.Join(workdir, "docker-compose.yaml")] = composefile.Bytes()
- files[filepath.Join(workdir, "genesis.json")] = []byte(config.node.genesis)
+ files[filepath.Join(workdir, "genesis.json")] = config.node.genesis
files[filepath.Join(workdir, "account.json")] = []byte(config.node.keyJSON)
files[filepath.Join(workdir, "account.pass")] = []byte(config.node.keyPass)
diff --git a/cmd/puppeth/module_node.go b/cmd/puppeth/module_node.go
index 8f912f9eb..375e3e646 100644
--- a/cmd/puppeth/module_node.go
+++ b/cmd/puppeth/module_node.go
@@ -128,7 +128,7 @@ func deployNode(client *sshClient, network string, bootv4, bootv5 []string, conf
files[filepath.Join(workdir, "docker-compose.yaml")] = composefile.Bytes()
//genesisfile, _ := json.MarshalIndent(config.genesis, "", " ")
- files[filepath.Join(workdir, "genesis.json")] = []byte(config.genesis)
+ files[filepath.Join(workdir, "genesis.json")] = config.genesis
if config.keyJSON != "" {
files[filepath.Join(workdir, "signer.json")] = []byte(config.keyJSON)
diff --git a/cmd/puppeth/ssh.go b/cmd/puppeth/ssh.go
index 26f846685..47378a606 100644
--- a/cmd/puppeth/ssh.go
+++ b/cmd/puppeth/ssh.go
@@ -27,7 +27,6 @@ import (
"os/user"
"path/filepath"
"strings"
- "syscall"
"github.com/ethereum/go-ethereum/log"
"golang.org/x/crypto/ssh"
@@ -85,7 +84,7 @@ func dial(server string, pubkey []byte) (*sshClient, error) {
}
auths = append(auths, ssh.PasswordCallback(func() (string, error) {
fmt.Printf("What's the login password for %s at %s? (won't be echoed)\n> ", login, server)
- blob, err := terminal.ReadPassword(int(syscall.Stdin))
+ blob, err := terminal.ReadPassword(int(os.Stdin.Fd()))
fmt.Println()
return string(blob), err
diff --git a/cmd/puppeth/wizard.go b/cmd/puppeth/wizard.go
index 5fbc11cb9..eb6d9e5aa 100644
--- a/cmd/puppeth/wizard.go
+++ b/cmd/puppeth/wizard.go
@@ -28,7 +28,6 @@ import (
"sort"
"strconv"
"strings"
- "syscall"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
@@ -231,7 +230,7 @@ func (w *wizard) readDefaultFloat(def float64) float64 {
// line and returns it. The input will not be echoed.
func (w *wizard) readPassword() string {
fmt.Printf("> ")
- text, err := terminal.ReadPassword(int(syscall.Stdin))
+ text, err := terminal.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
log.Crit("Failed to read password", "err", err)
}