lint add deadcode unused (#4606)

Added deadcode and unused linters to the repo, it
helped find some unused code.

Ref #4589
This commit is contained in:
Marko
2019-06-21 17:18:01 +02:00
committed by Alessio Treglia
parent 6672e70556
commit 4ffabb65a5
25 changed files with 17 additions and 138 deletions
-31
View File
@@ -1,31 +0,0 @@
package keys
import "fmt"
func errKeyNameConflict(name string) error {
return fmt.Errorf("account with name %s already exists", name)
}
func errMissingName() error {
return fmt.Errorf("you have to specify a name for the locally stored account")
}
func errMissingPassword() error {
return fmt.Errorf("you have to specify a password for the locally stored account")
}
func errMissingMnemonic() error {
return fmt.Errorf("you have to specify a mnemonic for key recovery")
}
func errInvalidMnemonic() error {
return fmt.Errorf("the mnemonic is invalid")
}
func errInvalidAccountNumber() error {
return fmt.Errorf("the account number is invalid")
}
func errInvalidIndexNumber() error {
return fmt.Errorf("the index number is invalid")
}
+2 -3
View File
@@ -30,9 +30,8 @@ type RestServer struct {
CliCtx context.CLIContext
KeyBase keybase.Keybase
log log.Logger
listener net.Listener
fingerprint string
log log.Logger
listener net.Listener
}
// NewRestServer creates a new rest server instance