Skip to content

Address (most) golint issues#5

Closed
PaulCapestany wants to merge 1 commit into
lightningnetwork:masterfrom
PaulCapestany:master
Closed

Address (most) golint issues#5
PaulCapestany wants to merge 1 commit into
lightningnetwork:masterfrom
PaulCapestany:master

Conversation

@PaulCapestany
Copy link
Copy Markdown
Contributor

Silence all complaints when golint ./... is run, except for those caused by generated gRPC code in rpc.pb.go, as well as the OP_CHECKSEQUENCEVERIFY opcode in script_utils.go

Fixed:

peer.go:58:2: struct field peerId should be peerID
rpcserver.go:36:6: func newRpcServer should be newRPCServer
server.go:145:10: var remoteId should be remoteID
chainntfs/chainntfs.go:5:1: comment on exported type ChainNotifier should be of the form "ChainNotifier ..." (with optional leading article)
chainntfs/chainntfs.go:22:6: exported type NotificationTrigger should have comment or be unexported
chainntfs/btcdnotify/btcd.go:15:1: comment on exported type BtcdNotifier should be of the form "BtcdNotifier ..." (with optional leading article)
chainntfs/btcdnotify/btcd.go:40:1: comment on exported function NewBtcdNotifier should be of the form "NewBtcdNotifier ..."
chainntfs/btcdnotify/btcd.go:60:1: comment on exported method BtcdNotifier.Start should be of the form "Start ..."
chainntfs/btcdnotify/btcd.go:74:1: comment on exported method BtcdNotifier.Stop should be of the form "Stop ..."
chainntfs/btcdnotify/btcd.go:216:1: comment on exported method BtcdNotifier.RegisterSpendNotification should be of the form "RegisterSpendNotification ..."
chainntfs/btcdnotify/btcd.go:233:1: comment on exported method BtcdNotifier.RegisterConfirmationsNotification should be of the form "RegisterConfirmationsNotification ..."
chainntfs/btcdnotify/source.go:8:1: comment on exported type ChainConnection should be of the form "ChainConnection ..." (with optional leading article)
channeldb/channel.go:26:2: comment on exported var ActiveNetParams should be of the form "ActiveNetParams ..."
channeldb/channel.go:30:1: comment on exported type Payment should be of the form "Payment ..." (with optional leading article)
channeldb/channel.go:36:1: comment on exported type ClosedChannel should be of the form "ClosedChannel ..." (with optional leading article)
channeldb/channel.go:40:1: comment on exported type OpenChannel should be of the form "OpenChannel ..." (with optional leading article)
channeldb/channel.go:100:1: comment on exported method DB.PutIdKey should be of the form "PutIdKey ..."
channeldb/channel.go:102:14: func PutIdKey should be PutIDKey
channeldb/channel.go:111:1: comment on exported method DB.GetIdAdr should be of the form "GetIdAdr ..."
channeldb/channel.go:112:14: func GetIdAdr should be GetIDAdr
channeldb/channel.go:128:1: comment on exported method DB.PutOpenChannel should be of the form "PutOpenChannel ..."
channeldb/channel.go:143:1: comment on exported method DB.FetchOpenChannel should be of the form "FetchOpenChannel ..."
channeldb/channel.go:218:1: comment on exported method OpenChannel.Encode should be of the form "Encode ..."
channeldb/channel.go:309:1: comment on exported method OpenChannel.Decode should be of the form "Decode ..."
channeldb/db.go:20:1: comment on exported type DB should be of the form "DB ..." (with optional leading article)
channeldb/db.go:29:1: comment on exported method DB.Wipe should be of the form "Wipe ..."
channeldb/db.go:38:1: comment on exported function New should be of the form "New ..."
channeldb/db.go:45:1: comment on exported function Open should be of the form "Open ..."
channeldb/db.go:51:1: comment on exported function Create should be of the form "Create ..."
cmd/lncli/commands.go:13:6: func printRespJson should be printRespJSON
cmd/lncli/commands.go:24:5: exported var ShellCommand should have comment or be unexported
cmd/lncli/commands.go:32:5: exported var NewAddressCommand should have comment or be unexported
cmd/lncli/commands.go:50:5: exported var SendManyCommand should have comment or be unexported
cmd/lncli/commands.go:76:5: exported var ConnectCommand should have comment or be unexported
cmd/lnshell/commands.go:11:1: comment on exported function RpcConnect should be of the form "RpcConnect ..."
cmd/lnshell/commands.go:12:6: func RpcConnect should be RPCConnect
cmd/lnshell/commands.go:41:1: exported function LnConnect should have comment or be unexported
cmd/lnshell/lnshellmain.go:56:1: exported function Shellparse should have comment or be unexported
elkrem/elkrem.go:37:1: comment on exported type ElkremNode should be of the form "ElkremNode ..." (with optional leading article)
elkrem/elkrem.go:39:6: type name will be used as elkrem.ElkremNode by other packages, and that stutters; consider calling this Node
elkrem/elkrem.go:44:6: exported type ElkremSender should have comment or be unexported
elkrem/elkrem.go:44:6: type name will be used as elkrem.ElkremSender by other packages, and that stutters; consider calling this Sender
elkrem/elkrem.go:50:6: exported type ElkremReceiver should have comment or be unexported
elkrem/elkrem.go:50:6: type name will be used as elkrem.ElkremReceiver by other packages, and that stutters; consider calling this Receiver
elkrem/elkrem.go:56:1: exported function LeftSha should have comment or be unexported
elkrem/elkrem.go:59:1: exported function RightSha should have comment or be unexported
elkrem/elkrem.go:85:1: comment on exported function NewElkremSender should be of the form "NewElkremSender ..."
elkrem/elkrem.go:98:1: comment on exported function NewElkremReceiver should be of the form "NewElkremReceiver ..."
elkrem/elkrem.go:105:1: comment on exported method ElkremSender.Next should be of the form "Next ..."
elkrem/elkrem.go:112:1: comment on exported method ElkremSender.AtIndex should be of the form "AtIndex ..."
elkrem/elkrem.go:118:1: exported method ElkremReceiver.AddNext should have comment or be unexported
elkrem/elkrem.go:143:1: exported method ElkremReceiver.AtIndex should have comment or be unexported
lndc/conn.go:18:1: comment on exported type LNDConn should be of the form "LNDConn ..." (with optional leading article)
lndc/conn.go:49:1: comment on exported function NewConn should be of the form "NewConn ..."
lndc/conn.go:54:1: comment on exported method LNDConn.Dial should be of the form "Dial ..."
lndc/conn.go:56:2: method parameter myId should be myID
lndc/conn.go:56:42: method parameter remoteId should be remoteID
lndc/conn.go:150:2: method parameter myId should be myID
lndc/conn.go:199:2: method parameter myId should be myID
lndc/listener.go:14:1: comment on exported type Listener should be of the form "Listener ..." (with optional leading article)
lndc/listener.go:23:1: comment on exported function NewListener should be of the form "NewListener ..."
lndc/listener.go:118:2: method parameter myId should be myID
lndc/lnadr.go:14:1: comment on exported type LNAdr should be of the form "LNAdr ..." (with optional leading article)
lndc/lnadr.go:16:2: struct field lnId should be lnID
lndc/lnadr.go:28:6: var encodedId should be encodedID
lndc/lnadr.go:38:1: comment on exported function LnAddrFromString should be of the form "LnAddrFromString ..."
lnstate/lnstate.go:45:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:45:2: exported const MAX_STAGED_HTLCS should have comment (or a comment on this block) or be unexported
lnstate/lnstate.go:46:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:47:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:72:2: comment on exported const ADD_PRESTAGE should be of the form "ADD_PRESTAGE ..."
lnstate/lnstate.go:73:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:74:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:75:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:76:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:77:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:79:2: comment on exported const TIMEOUT_PRESTAGE should be of the form "TIMEOUT_PRESTAGE ..."
lnstate/lnstate.go:80:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:81:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:82:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:83:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:85:2: comment on exported const SETTLE_PRESTAGE should be of the form "SETTLE_PRESTAGE ..."
lnstate/lnstate.go:86:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:87:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:88:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:89:2: don't use ALL_CAPS in Go names; use CamelCase
lnstate/lnstate.go:101:6: exported type LNChannel should have comment or be unexported
lnstate/lnstate.go:150:6: exported type PaymentDescriptor should have comment or be unexported
lnstate/lnstate.go:201:4: should replace l.ourLastKey += 1 with l.ourLastKey++
lnstate/lnstate.go:205:4: should replace l.ourLastKey += 1 with l.ourLastKey++
lnstate/lnstate.go:216:1: exported method LNChannel.CreateHTLC should have comment or be unexported
lnstate/lnstate.go:225:21: error strings should not end with punctuation
lnwallet/channel.go:19:2: comment on exported const MaxPendingPayments should be of the form "MaxPendingPayments ..."
lnwallet/channel.go:28:1: comment on exported type LightningChannel should be of the form "LightningChannel ..." (with optional leading article)
lnwallet/channel.go:83:2: var fundingTxId should be fundingTxID
lnwallet/channel.go:95:1: comment on exported type PaymentDescriptor should be of the form "PaymentDescriptor ..." (with optional leading article)
lnwallet/channel.go:107:1: comment on exported type ChannelUpdate should be of the form "ChannelUpdate ..." (with optional leading article)
lnwallet/channel.go:127:1: comment on exported method ChannelUpdate.RevocationHash should be of the form "RevocationHash ..."
lnwallet/channel.go:141:1: comment on exported method ChannelUpdate.SignCounterPartyCommitment should be of the form "SignCounterPartyCommitment ..."
lnwallet/channel.go:163:1: comment on exported method ChannelUpdate.PreviousRevocationPreImage should be of the form "PreviousRevocationPreImage ..."
lnwallet/channel.go:179:1: comment on exported method ChannelUpdate.VerifyNewCommitmentSigs should be of the form "VerifyNewCommitmentSigs ..."
lnwallet/channel.go:219:1: comment on exported method ChannelUpdate.Commit should be of the form "Commit ..."
lnwallet/channel.go:266:1: comment on exported method LightningChannel.AddHTLC should be of the form "AddHTLC ..."
lnwallet/channel.go:420:1: comment on exported method LightningChannel.SettleHTLC should be of the form "SettleHTLC ..."
lnwallet/channel.go:525:1: comment on exported method LightningChannel.CancelHTLC should be of the form "CancelHTLC ..."
lnwallet/channel.go:530:1: comment on exported method LightningChannel.OurBalance should be of the form "OurBalance ..."
lnwallet/channel.go:537:1: comment on exported method LightningChannel.TheirBalance should be of the form "TheirBalance ..."
lnwallet/channel.go:544:1: comment on exported method LightningChannel.ForceClose should be of the form "ForceClose ..."
lnwallet/channel.go:549:1: comment on exported method LightningChannel.RequestPayment should be of the form "RequestPayment ..."
lnwallet/channel.go:555:1: comment on exported type PaymentRequest should be of the form "PaymentRequest ..." (with optional leading article)
lnwallet/config.go:32:1: comment on exported type Config should be of the form "Config ..." (with optional leading article)
lnwallet/config.go:39:2: struct field RpcHost should be RPCHost
lnwallet/config.go:40:2: struct field RpcUser should be RPCUser
lnwallet/config.go:41:2: struct field RpcPass should be RPCPass
lnwallet/reservation.go:157:1: comment on exported method ChannelReservation.ProcessContribution should be of the form "ProcessContribution ..."
lnwallet/reservation.go:200:1: comment on exported method ChannelReservation.CompleteReservation should be of the form "CompleteReservation ..."
lnwallet/reservation.go:227:1: comment on exported method ChannelReservation.TheirSignatures should be of the form "TheirSignatures ..."
lnwallet/script_utils.go:14:2: comment on exported var SequenceLockTimeSeconds should be of the form "SequenceLockTimeSeconds ..."
lnwallet/script_utils.go:17:2: exported var SequenceLockTimeMask should have comment or be unexported
lnwallet/setup.go:37:2: a blank import should be only in a main or test package, or have a comment justifying it
lnwallet/wallet.go:40:2: comment on exported var ErrInsufficientFunds should be of the form "ErrInsufficientFunds ..."
lnwallet/wallet.go:44:2: comment on exported var ActiveNetParams should be of the form "ActiveNetParams ..."
lnwallet/wallet.go:64:2: comment on exported const SEGWIT should be of the form "SEGWIT ..."
lnwallet/wallet.go:67:2: comment on exported const SIGHASH should be of the form "SIGHASH ..."
lnwallet/wallet.go:70:2: comment on exported const CSV should be of the form "CSV ..."
lnwallet/wallet.go:73:2: comment on exported const CSV_RESERVE should be of the form "CSV_RESERVE ..."
lnwallet/wallet.go:75:2: don't use ALL_CAPS in Go names; use CamelCase
lnwallet/wallet.go:77:2: comment on exported const CLTV_RESERVE should be of the form "CLTV_RESERVE ..."
lnwallet/wallet.go:78:2: don't use ALL_CAPS in Go names; use CamelCase
lnwallet/wallet_test.go:100:9: should omit 2nd value from range; this loop is equivalent to `for i := range ...`
lnwire/close_complete.go:11:6: exported type CloseComplete should have comment or be unexported
lnwire/close_complete.go:18:1: exported method CloseComplete.Decode should have comment or be unexported
lnwire/close_complete.go:34:1: comment on exported function NewCloseComplete should be of the form "NewCloseComplete ..."
lnwire/close_complete.go:39:1: comment on exported method CloseComplete.Encode should be of the form "Encode ..."
lnwire/close_complete.go:56:1: exported method CloseComplete.Command should have comment or be unexported
lnwire/close_complete.go:60:1: exported method CloseComplete.MaxPayloadLength should have comment or be unexported
lnwire/close_complete.go:65:1: comment on exported method CloseComplete.Validate should be of the form "Validate ..."
lnwire/close_request.go:11:6: exported type CloseRequest should have comment or be unexported
lnwire/close_request.go:18:1: exported method CloseRequest.Decode should have comment or be unexported
lnwire/close_request.go:34:1: comment on exported function NewCloseRequest should be of the form "NewCloseRequest ..."
lnwire/close_request.go:39:1: comment on exported method CloseRequest.Encode should be of the form "Encode ..."
lnwire/close_request.go:56:1: exported method CloseRequest.Command should have comment or be unexported
lnwire/close_request.go:60:1: exported method CloseRequest.MaxPayloadLength should have comment or be unexported
lnwire/close_request.go:65:1: comment on exported method CloseRequest.Validate should be of the form "Validate ..."
lnwire/commit_revocation.go:8:1: comment on exported type CommitRevocation should be of the form "CommitRevocation ..." (with optional leading article)
lnwire/commit_revocation.go:26:1: exported method CommitRevocation.Decode should have comment or be unexported
lnwire/commit_revocation.go:42:1: comment on exported function NewCommitRevocation should be of the form "NewCommitRevocation ..."
lnwire/commit_revocation.go:47:1: comment on exported method CommitRevocation.Encode should be of the form "Encode ..."
lnwire/commit_revocation.go:62:1: exported method CommitRevocation.Command should have comment or be unexported
lnwire/commit_revocation.go:66:1: exported method CommitRevocation.MaxPayloadLength should have comment or be unexported
lnwire/commit_revocation.go:70:1: comment on exported method CommitRevocation.Validate should be of the form "Validate ..."
lnwire/commit_signature.go:10:1: comment on exported type CommitSignature should be of the form "CommitSignature ..." (with optional leading article)
lnwire/commit_signature.go:37:1: exported method CommitSignature.Decode should have comment or be unexported
lnwire/commit_signature.go:59:1: comment on exported function NewCommitSignature should be of the form "NewCommitSignature ..."
lnwire/commit_signature.go:64:1: comment on exported method CommitSignature.Encode should be of the form "Encode ..."
lnwire/commit_signature.go:82:1: exported method CommitSignature.Command should have comment or be unexported
lnwire/commit_signature.go:86:1: exported method CommitSignature.MaxPayloadLength should have comment or be unexported
lnwire/commit_signature.go:90:1: comment on exported method CommitSignature.Validate should be of the form "Validate ..."
lnwire/error_generic.go:8:1: comment on exported type ErrorGeneric should be of the form "ErrorGeneric ..." (with optional leading article)
lnwire/error_generic.go:18:1: exported method ErrorGeneric.Decode should have comment or be unexported
lnwire/error_generic.go:32:1: comment on exported function NewErrorGeneric should be of the form "NewErrorGeneric ..."
lnwire/error_generic.go:37:1: comment on exported method ErrorGeneric.Encode should be of the form "Encode ..."
lnwire/error_generic.go:51:1: exported method ErrorGeneric.Command should have comment or be unexported
lnwire/error_generic.go:55:1: exported method ErrorGeneric.MaxPayloadLength should have comment or be unexported
lnwire/error_generic.go:60:1: comment on exported method ErrorGeneric.Validate should be of the form "Validate ..."
lnwire/funding_request.go:11:6: exported type FundingRequest should have comment or be unexported
lnwire/funding_request.go:56:1: exported method FundingRequest.Decode should have comment or be unexported
lnwire/funding_request.go:99:1: comment on exported function NewFundingRequest should be of the form "NewFundingRequest ..."
lnwire/funding_request.go:104:1: comment on exported method FundingRequest.Encode should be of the form "Encode ..."
lnwire/funding_request.go:142:1: exported method FundingRequest.Command should have comment or be unexported
lnwire/funding_request.go:146:1: exported method FundingRequest.MaxPayloadLength should have comment or be unexported
lnwire/funding_request.go:151:1: comment on exported method FundingRequest.Validate should be of the form "Validate ..."
lnwire/funding_response.go:11:6: exported type FundingResponse should have comment or be unexported
lnwire/funding_response.go:41:1: exported method FundingResponse.Decode should have comment or be unexported
lnwire/funding_response.go:83:1: comment on exported function NewFundingResponse should be of the form "NewFundingResponse ..."
lnwire/funding_response.go:88:1: comment on exported method FundingResponse.Encode should be of the form "Encode ..."
lnwire/funding_response.go:126:1: exported method FundingResponse.Command should have comment or be unexported
lnwire/funding_response.go:130:1: exported method FundingResponse.MaxPayloadLength should have comment or be unexported
lnwire/funding_response.go:135:1: comment on exported method FundingResponse.Validate should be of the form "Validate ..."
lnwire/funding_signaccept.go:9:6: exported type FundingSignAccept should have comment or be unexported
lnwire/funding_signaccept.go:16:1: exported method FundingSignAccept.Decode should have comment or be unexported
lnwire/funding_signaccept.go:35:1: comment on exported function NewFundingSignAccept should be of the form "NewFundingSignAccept ..."
lnwire/funding_signaccept.go:40:1: comment on exported method FundingSignAccept.Encode should be of the form "Encode ..."
lnwire/funding_signaccept.go:57:1: exported method FundingSignAccept.Command should have comment or be unexported
lnwire/funding_signaccept.go:61:1: exported method FundingSignAccept.MaxPayloadLength should have comment or be unexported
lnwire/funding_signaccept.go:66:1: comment on exported method FundingSignAccept.Validate should be of the form "Validate ..."
lnwire/funding_signcomplete.go:10:6: exported type FundingSignComplete should have comment or be unexported
lnwire/funding_signcomplete.go:17:1: exported method FundingSignComplete.Decode should have comment or be unexported
lnwire/funding_signcomplete.go:35:1: comment on exported function NewFundingSignComplete should be of the form "NewFundingSignComplete ..."
lnwire/funding_signcomplete.go:40:1: comment on exported method FundingSignComplete.Encode should be of the form "Encode ..."
lnwire/funding_signcomplete.go:54:1: exported method FundingSignComplete.Command should have comment or be unexported
lnwire/funding_signcomplete.go:58:1: exported method FundingSignComplete.MaxPayloadLength should have comment or be unexported
lnwire/funding_signcomplete.go:63:1: comment on exported method FundingSignComplete.Validate should be of the form "Validate ..."
lnwire/htlc_addaccept.go:8:6: exported type HTLCAddAccept should have comment or be unexported
lnwire/htlc_addaccept.go:13:1: exported method HTLCAddAccept.Decode should have comment or be unexported
lnwire/htlc_addaccept.go:27:1: comment on exported function NewHTLCAddAccept should be of the form "NewHTLCAddAccept ..."
lnwire/htlc_addaccept.go:32:1: comment on exported method HTLCAddAccept.Encode should be of the form "Encode ..."
lnwire/htlc_addaccept.go:47:1: exported method HTLCAddAccept.Command should have comment or be unexported
lnwire/htlc_addaccept.go:51:1: exported method HTLCAddAccept.MaxPayloadLength should have comment or be unexported
lnwire/htlc_addaccept.go:56:1: comment on exported method HTLCAddAccept.Validate should be of the form "Validate ..."
lnwire/htlc_addreject.go:8:6: exported type HTLCAddReject should have comment or be unexported
lnwire/htlc_addreject.go:13:1: exported method HTLCAddReject.Decode should have comment or be unexported
lnwire/htlc_addreject.go:30:1: comment on exported function NewHTLCAddReject should be of the form "NewHTLCAddReject ..."
lnwire/htlc_addreject.go:35:1: comment on exported method HTLCAddReject.Encode should be of the form "Encode ..."
lnwire/htlc_addreject.go:50:1: exported method HTLCAddReject.Command should have comment or be unexported
lnwire/htlc_addreject.go:54:1: exported method HTLCAddReject.MaxPayloadLength should have comment or be unexported
lnwire/htlc_addreject.go:59:1: comment on exported method HTLCAddReject.Validate should be of the form "Validate ..."
lnwire/htlc_addrequest.go:8:1: comment on exported type HTLCAddRequest should be of the form "HTLCAddRequest ..." (with optional leading article)
lnwire/htlc_addrequest.go:40:1: exported method HTLCAddRequest.Decode should have comment or be unexported
lnwire/htlc_addrequest.go:64:1: comment on exported function NewHTLCAddRequest should be of the form "NewHTLCAddRequest ..."
lnwire/htlc_addrequest.go:69:1: comment on exported method HTLCAddRequest.Encode should be of the form "Encode ..."
lnwire/htlc_addrequest.go:88:1: exported method HTLCAddRequest.Command should have comment or be unexported
lnwire/htlc_addrequest.go:92:1: exported method HTLCAddRequest.MaxPayloadLength should have comment or be unexported
lnwire/htlc_addrequest.go:98:1: comment on exported method HTLCAddRequest.Validate should be of the form "Validate ..."
lnwire/htlc_settleaccept.go:8:1: comment on exported type HTLCSettleAccept should be of the form "HTLCSettleAccept ..." (with optional leading article)
lnwire/htlc_settleaccept.go:18:1: exported method HTLCSettleAccept.Decode should have comment or be unexported
lnwire/htlc_settleaccept.go:32:1: comment on exported function NewHTLCSettleAccept should be of the form "NewHTLCSettleAccept ..."
lnwire/htlc_settleaccept.go:37:1: comment on exported method HTLCSettleAccept.Encode should be of the form "Encode ..."
lnwire/htlc_settleaccept.go:51:1: exported method HTLCSettleAccept.Command should have comment or be unexported
lnwire/htlc_settleaccept.go:55:1: exported method HTLCSettleAccept.MaxPayloadLength should have comment or be unexported
lnwire/htlc_settleaccept.go:60:1: comment on exported method HTLCSettleAccept.Validate should be of the form "Validate ..."
lnwire/htlc_settlerequest.go:8:1: comment on exported type HTLCSettleRequest should be of the form "HTLCSettleRequest ..." (with optional leading article)
lnwire/htlc_settlerequest.go:21:1: exported method HTLCSettleRequest.Decode should have comment or be unexported
lnwire/htlc_settlerequest.go:42:1: comment on exported function NewHTLCSettleRequest should be of the form "NewHTLCSettleRequest ..."
lnwire/htlc_settlerequest.go:47:1: comment on exported method HTLCSettleRequest.Encode should be of the form "Encode ..."
lnwire/htlc_settlerequest.go:62:1: exported method HTLCSettleRequest.Command should have comment or be unexported
lnwire/htlc_settlerequest.go:66:1: exported method HTLCSettleRequest.MaxPayloadLength should have comment or be unexported
lnwire/htlc_settlerequest.go:71:1: comment on exported method HTLCSettleRequest.Validate should be of the form "Validate ..."
lnwire/htlc_timeoutaccept.go:8:1: comment on exported type HTLCTimeoutAccept should be of the form "HTLCTimeoutAccept ..." (with optional leading article)
lnwire/htlc_timeoutaccept.go:18:1: exported method HTLCTimeoutAccept.Decode should have comment or be unexported
lnwire/htlc_timeoutaccept.go:32:1: comment on exported function NewHTLCTimeoutAccept should be of the form "NewHTLCTimeoutAccept ..."
lnwire/htlc_timeoutaccept.go:37:1: comment on exported method HTLCTimeoutAccept.Encode should be of the form "Encode ..."
lnwire/htlc_timeoutaccept.go:51:1: exported method HTLCTimeoutAccept.Command should have comment or be unexported
lnwire/htlc_timeoutaccept.go:55:1: exported method HTLCTimeoutAccept.MaxPayloadLength should have comment or be unexported
lnwire/htlc_timeoutaccept.go:60:1: comment on exported method HTLCTimeoutAccept.Validate should be of the form "Validate ..."
lnwire/htlc_timeoutrequest.go:8:1: comment on exported type HTLCTimeoutRequest should be of the form "HTLCTimeoutRequest ..." (with optional leading article)
lnwire/htlc_timeoutrequest.go:18:1: exported method HTLCTimeoutRequest.Decode should have comment or be unexported
lnwire/htlc_timeoutrequest.go:32:1: comment on exported function NewHTLCTimeoutRequest should be of the form "NewHTLCTimeoutRequest ..."
lnwire/htlc_timeoutrequest.go:37:1: comment on exported method HTLCTimeoutRequest.Encode should be of the form "Encode ..."
lnwire/htlc_timeoutrequest.go:51:1: exported method HTLCTimeoutRequest.Command should have comment or be unexported
lnwire/htlc_timeoutrequest.go:55:1: exported method HTLCTimeoutRequest.MaxPayloadLength should have comment or be unexported
lnwire/htlc_timeoutrequest.go:60:1: comment on exported method HTLCTimeoutRequest.Validate should be of the form "Validate ..."
lnwire/lnwire.go:14:5: don't use ALL_CAPS in Go names; use CamelCase
lnwire/lnwire.go:14:5: exported var MAX_SLICE_LENGTH should have comment or be unexported
lnwire/lnwire.go:16:1: comment on exported type PkScript should be of the form "PkScript ..." (with optional leading article)
lnwire/lnwire.go:19:6: exported type HTLCKey should have comment or be unexported
lnwire/lnwire.go:20:6: exported type CommitHeight should have comment or be unexported
lnwire/lnwire.go:22:1: comment on exported type CreditsAmount should be of the form "CreditsAmount ..." (with optional leading article)
lnwire/lnwire.go:440:22: error strings should not end with punctuation
lnwire/lnwire.go:502:22: error strings should not end with punctuation
lnwire/lnwire.go:524:22: error strings should not end with punctuation
lnwire/lnwire.go:538:22: error strings should not end with punctuation
lnwire/lnwire.go:606:1: comment on exported function ValidatePkScript should be of the form "ValidatePkScript ..."
lnwire/lnwire_test.go:19:2: don't use ALL_CAPS in Go names; use CamelCase
lnwire/message.go:1:1: package comment should be of the form "Package lnwire ..."
lnwire/message.go:14:2: don't use ALL_CAPS in Go names; use CamelCase
lnwire/message.go:15:2: don't use ALL_CAPS in Go names; use CamelCase
lnwire/message.go:17:2: don't use ALL_CAPS in Go names; use CamelCase
lnwire/message.go:18:2: don't use ALL_CAPS in Go names; use CamelCase
lnwire/message.go:20:2: don't use ALL_CAPS in Go names; use CamelCase
lnwire/message.go:22:2: don't use ALL_CAPS in Go names; use CamelCase
lnwire/message.go:23:2: don't use ALL_CAPS in Go names; use CamelCase
lnwire/message.go:29:7: exported const MaxMessagePayload should have comment or be unexported
lnwire/message.go:32:2: comment on exported const CmdFundingRequest should be of the form "CmdFundingRequest ..."
lnwire/message.go:34:2: exported const CmdFundingResponse should have comment (or a comment on this block) or be unexported
lnwire/message.go:38:2: comment on exported const CmdCloseRequest should be of the form "CmdCloseRequest ..."
lnwire/message.go:42:2: comment on exported const CmdHTLCAddRequest should be of the form "CmdHTLCAddRequest ..."
lnwire/message.go:48:2: comment on exported const CmdHTLCSettleRequest should be of the form "CmdHTLCSettleRequest ..."
lnwire/message.go:53:2: comment on exported const CmdHTLCTimeoutRequest should be of the form "CmdHTLCTimeoutRequest ..."
lnwire/message.go:57:2: comment on exported const CmdCommitSignature should be of the form "CmdCommitSignature ..."
lnwire/message.go:61:2: comment on exported const CmdErrorGeneric should be of the form "CmdErrorGeneric ..."
lnwire/message.go:65:1: comment on exported type Message should be of the form "Message ..." (with optional leading article)
lnwire/message.go:168:1: exported function WriteMessage should have comment or be unexported
lnwire/message.go:222:1: exported function ReadMessage should have comment or be unexported
lnwire/message.go:232:43: error strings should not end with punctuation
lnwire/message.go:253:43: error strings should not end with punctuation
shachain/shachain.go:25:1: comment on exported type HyperShaChain should be of the form "HyperShaChain ..." (with optional leading article)
shachain/shachain.go:38:1: comment on exported function New should be of the form "New ..."
shachain/shachain.go:44:1: comment on exported function NewFromSeed should be of the form "NewFromSeed ..."
shachain/shachain.go:98:1: comment on exported method HyperShaChain.GetHash should be of the form "GetHash ..."
shachain/shachain.go:117:1: comment on exported method HyperShaChain.AddNextHash should be of the form "AddNextHash ..."
shachain/shachain.go:147:1: comment on exported method HyperShaChain.CurrentPreImage should be of the form "CurrentPreImage ..."
shachain/shachain.go:154:1: comment on exported method HyperShaChain.CurrentRevocationHash should be of the form "CurrentRevocationHash ..."
shachain/shachain.go:162:1: comment on exported method HyperShaChain.LocatePreImage should be of the form "LocatePreImage ..."
shachain/shachain.go:173:1: comment on exported method HyperShaChain.Encode should be of the form "Encode ..."
shachain/shachain.go:178:1: comment on exported method HyperShaChain.Decode should be of the form "Decode ..."
uspv/eight333.go:19:2: comment on exported const NETVERSION should be of the form "NETVERSION ..."
uspv/eight333.go:22:2: exported const VERSION should have comment (or a comment on this block) or be unexported
uspv/eight333.go:29:6: exported type SPVCon should have comment or be unexported
uspv/eight333.go:48:1: exported method SPVCon.Open should have comment or be unexported
uspv/eight333.go:142:1: exported method SPVCon.PongBack should have comment or be unexported
uspv/eight333.go:149:1: exported method SPVCon.SendFilter should have comment or be unexported
uspv/eight333.go:154:1: exported method SPVCon.AskForHeaders should have comment or be unexported
uspv/eight333.go:197:1: exported method SPVCon.IngestHeaders should have comment or be unexported
uspv/eight333.go:277:1: exported method SPVCon.AskForMerkBlocks should have comment or be unexported
uspv/header.go:93:1: exported function CheckHeader should have comment or be unexported
uspv/header.go:182:1: comment on exported function CheckRange should be of the form "CheckRange ..."
uspv/mblock.go:9:1: exported function MakeMerkleParent should have comment or be unexported
uspv/txstore.go:13:6: exported type TxStore should have comment or be unexported
uspv/txstore.go:20:6: exported type Utxo should have comment or be unexported
uspv/txstore.go:28:6: exported type MyAdr should have comment or be unexported
uspv/txstore.go:33:1: comment on exported method TxStore.AddAdr should be of the form "AddAdr ..."
uspv/txstore.go:42:1: comment on exported method TxStore.AddTxid should be of the form "AddTxid ..."
uspv/txstore.go:51:1: comment on exported method TxStore.GimmeFilter should be of the form "GimmeFilter ..."
uspv/txstore.go:63:1: comment on exported method TxStore.IngestTx should be of the form "IngestTx ..."
uspv/txstore.go:89:1: comment on exported method TxStore.AbsorbTx should be of the form "AbsorbTx ..."
uspv/txstore.go:123:1: comment on exported method TxStore.ExpellTx should be of the form "ExpellTx ..."

Left as-is:

lnrpc/rpc.pb.go:35:6: exported type SendManyRequest should have comment or be unexported
lnrpc/rpc.pb.go:39:1: exported method SendManyRequest.Reset should have comment or be unexported
lnrpc/rpc.pb.go:41:1: exported method SendManyRequest.ProtoMessage should have comment or be unexported
lnrpc/rpc.pb.go:42:1: exported method SendManyRequest.Descriptor should have comment or be unexported
lnrpc/rpc.pb.go:44:1: exported method SendManyRequest.GetAddrToAmount should have comment or be unexported
lnrpc/rpc.pb.go:51:6: exported type SendManyResponse should have comment or be unexported
lnrpc/rpc.pb.go:55:1: exported method SendManyResponse.Reset should have comment or be unexported
lnrpc/rpc.pb.go:57:1: exported method SendManyResponse.ProtoMessage should have comment or be unexported
lnrpc/rpc.pb.go:58:1: exported method SendManyResponse.Descriptor should have comment or be unexported
lnrpc/rpc.pb.go:60:6: exported type NewAddressRequest should have comment or be unexported
lnrpc/rpc.pb.go:63:1: exported method NewAddressRequest.Reset should have comment or be unexported
lnrpc/rpc.pb.go:65:1: exported method NewAddressRequest.ProtoMessage should have comment or be unexported
lnrpc/rpc.pb.go:66:1: exported method NewAddressRequest.Descriptor should have comment or be unexported
lnrpc/rpc.pb.go:68:6: exported type NewAddressResponse should have comment or be unexported
lnrpc/rpc.pb.go:72:1: exported method NewAddressResponse.Reset should have comment or be unexported
lnrpc/rpc.pb.go:74:1: exported method NewAddressResponse.ProtoMessage should have comment or be unexported
lnrpc/rpc.pb.go:75:1: exported method NewAddressResponse.Descriptor should have comment or be unexported
lnrpc/rpc.pb.go:77:6: exported type ConnectPeerRequest should have comment or be unexported
lnrpc/rpc.pb.go:78:2: struct field IdAtHost should be IDAtHost
lnrpc/rpc.pb.go:81:1: exported method ConnectPeerRequest.Reset should have comment or be unexported
lnrpc/rpc.pb.go:83:1: exported method ConnectPeerRequest.ProtoMessage should have comment or be unexported
lnrpc/rpc.pb.go:84:1: exported method ConnectPeerRequest.Descriptor should have comment or be unexported
lnrpc/rpc.pb.go:86:6: exported type ConnectPeerResponse should have comment or be unexported
lnrpc/rpc.pb.go:90:1: exported method ConnectPeerResponse.Reset should have comment or be unexported
lnrpc/rpc.pb.go:92:1: exported method ConnectPeerResponse.ProtoMessage should have comment or be unexported
lnrpc/rpc.pb.go:93:1: exported method ConnectPeerResponse.Descriptor should have comment or be unexported
lnrpc/rpc.pb.go:110:6: exported type LightningClient should have comment or be unexported
lnrpc/rpc.pb.go:120:1: exported function NewLightningClient should have comment or be unexported
lnrpc/rpc.pb.go:153:6: exported type LightningServer should have comment or be unexported
lnrpc/rpc.pb.go:159:1: exported function RegisterLightningServer should have comment or be unexported
lnrpc/rpc.pb.go:163:6: don't use underscores in Go names; func _Lightning_SendMany_Handler should be _LightningSendManyHandler
lnrpc/rpc.pb.go:175:6: don't use underscores in Go names; func _Lightning_NewAddress_Handler should be _LightningNewAddressHandler
lnrpc/rpc.pb.go:187:6: don't use underscores in Go names; func _Lightning_ConnectPeer_Handler should be _LightningConnectPeerHandler
lnrpc/rpc.pb.go:199:5: don't use underscores in Go names; var _Lightning_serviceDesc should be _LightningServiceDesc
lnwallet/script_utils.go:18:2: don't use ALL_CAPS in Go names; use CamelCase

* silence all golint complaints except for those caused by generated gRPC code in rpc.pb.go, as well as the OP_CHECKSEQUENCEVERIFY opcode in script_utils.go
Comment thread lnwallet/setup.go
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mind reconciling this comment now?

It should read something like:

// Importing the bdb package in order to register the boltdb implementation of the walletdb interface. 

@Roasbeef
Copy link
Copy Markdown
Member

Roasbeef commented Feb 3, 2016

Hey Paul, thanks for another PR!

It's correct that all the golint errors generated by the auto-generated .pb.go files should be ignored. Additionally, the added alias to CSV in lnwallet/script_utils.go should be left alone as well.

Also, it's worth nothing that many of these lint errors exist, simply because much of the code in lnwire, and lnstate are in a draft stage, and unfinalized.

Could you rebase this to catch it up to the latest master? The merge may be a bit hairy as Tadge, and I have recently merged some development branches into master...

@PaulCapestany
Copy link
Copy Markdown
Contributor Author

@Roasbeef I mostly wanted a good excuse to take a stroll through the whole lnd code base (and also wanted to perhaps help out in setting things up for some btcd-level documentation)... and, I personally hate the linter warnings I get when perusing files, so wanted to get rid of them as much as possible :)

I get that the lnd code base is gonna be in bigtime flux (obviously), happy to do new PR with updated lint fixes if it's not totally annoying for you guys to deal with right now—otherwise I'm completely cool with waiting till things settle down a bit more to push for better linting/docs ;)

@PaulCapestany
Copy link
Copy Markdown
Contributor Author

Closing this out to avoid merge headache (when I get some free time I may go through lnd with golint again against the most recent master commit—would do so in a separate PR though).

@PaulCapestany PaulCapestany changed the title Address (most*) golint issues Address (most) golint issues Feb 25, 2016
avemeva added a commit to avemeva/lnd that referenced this pull request May 4, 2017
Step lightningnetwork#5 in making htlcManager (aka channelLink) testable:
Combine all that have been done so far and add test framework for channel
links which allow unit test:

* message ordering
* detect redundant messages
* single hop payment
* multihop payment
* several cancel payment scenarios
avemeva added a commit to avemeva/lnd that referenced this pull request May 15, 2017
Step lightningnetwork#5 in making htlcManager (aka channelLink) testable:
Combine all that have been done so far and add test framework for channel
links which allow unit test:

* message ordering
* detect redundant messages
* single hop payment
* multihop payment
* several cancel payment scenarios
avemeva added a commit to avemeva/lnd that referenced this pull request May 22, 2017
Step lightningnetwork#5 in making htlcManager (aka channelLink) testable:
Combine all that have been done so far and add test framework for channel
links which allow unit test:

* message ordering
* detect redundant messages
* single hop payment
* multihop payment
* several cancel payment scenarios
avemeva added a commit to avemeva/lnd that referenced this pull request May 25, 2017
Step lightningnetwork#5 in making htlcManager (aka channelLink) testable:
Combine all that have been done so far and add test framework for channel
links which allow unit test:

* message ordering
* detect redundant messages
* single hop payment
* multihop payment
* several cancel payment scenarios
Roasbeef pushed a commit that referenced this pull request May 31, 2017
Step #5 in making htlcManager (aka channelLink) testable:
Combine all that have been done so far and add test framework for channel
links which allow unit test:

* message ordering
* detect redundant messages
* single hop payment
* multihop payment
* several cancel payment scenarios
@beussdelanight beussdelanight mentioned this pull request Apr 8, 2018
@xiaofo09 xiaofo09 mentioned this pull request Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants