multi: fix linter issues

pull/59/head
Oliver Gugger 1 year ago
parent 1474313959
commit a594f05e73
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

@ -53,6 +53,10 @@ linters:
- scopelint
- golint
- exhaustivestruct
- nosnakecase
- deadcode
- structcheck
- varcheck
issues:
exclude-rules:

@ -83,7 +83,7 @@ func ReadMnemonicFromTerminal(params *chaincfg.Params) (*hdkeychain.ExtendedKey,
fmt.Printf("Input your cipher seed passphrase (press enter " +
"if your seed doesn't have a passphrase): ")
passphraseBytes, err = terminal.ReadPassword(
int(syscall.Stdin), // nolint
int(syscall.Stdin), //nolint
)
if err != nil {
return nil, err

@ -240,9 +240,9 @@ func readInput(input string) ([]byte, error) {
func passwordFromConsole(userQuery string) ([]byte, error) {
// Read from terminal (if there is one).
if terminal.IsTerminal(int(syscall.Stdin)) { // nolint
if terminal.IsTerminal(int(syscall.Stdin)) { //nolint
fmt.Print(userQuery)
pw, err := terminal.ReadPassword(int(syscall.Stdin)) // nolint
pw, err := terminal.ReadPassword(int(syscall.Stdin)) //nolint
if err != nil {
return nil, err
}

@ -89,7 +89,7 @@ func ReadAezeed(params *chaincfg.Params) (*hdkeychain.ExtendedKey, time.Time,
"if your seed doesn't have a passphrase): ")
var err error
passphraseBytes, err = terminal.ReadPassword(
int(syscall.Stdin), // nolint
int(syscall.Stdin), //nolint
)
if err != nil {
return nil, time.Unix(0, 0), err

@ -9,7 +9,7 @@ import (
func AllNodeChannels(graph *lnrpc.ChannelGraph,
nodePubKey string) []*lnrpc.ChannelEdge {
var result []*lnrpc.ChannelEdge // nolint:prealloc
var result []*lnrpc.ChannelEdge //nolint:prealloc
for _, edge := range graph.Edges {
if edge.Node1Pub != nodePubKey && edge.Node2Pub != nodePubKey {
continue
@ -24,7 +24,7 @@ func AllNodeChannels(graph *lnrpc.ChannelGraph,
func FindCommonEdges(graph *lnrpc.ChannelGraph, node1,
node2 string) []*lnrpc.ChannelEdge {
var result []*lnrpc.ChannelEdge // nolint:prealloc
var result []*lnrpc.ChannelEdge //nolint:prealloc
for _, edge := range graph.Edges {
if edge.Node1Pub != node1 && edge.Node2Pub != node1 {
continue

@ -127,7 +127,7 @@ func maybeTweakPrivKey(signDesc *input.SignDescriptor,
// k is our private key, and P is the public key, we perform the following
// operation:
//
// sx := k*P s := sha256(sx.SerializeCompressed())
// sx := k*P s := sha256(sx.SerializeCompressed())
func ECDH(privKey *btcec.PrivateKey, pub *btcec.PublicKey) ([32]byte, error) {
var (
pubJacobian btcec.JacobianPoint

Loading…
Cancel
Save