Fix issues found by golint.

This commit is contained in:
Josh Rickmar 2014-04-12 12:02:54 -05:00
parent 4465e71837
commit 7ec063aebc

View file

@ -468,7 +468,7 @@ func (a *AddressPubKey) String() string {
return hex.EncodeToString(a.serialize()) return hex.EncodeToString(a.serialize())
} }
// PubKeyFormat returns the format (uncompressed, compressed, etc) of the // Format returns the format (uncompressed, compressed, etc) of the
// pay-to-pubkey address. // pay-to-pubkey address.
func (a *AddressPubKey) Format() PubKeyFormat { func (a *AddressPubKey) Format() PubKeyFormat {
return a.pubKeyFormat return a.pubKeyFormat
@ -520,7 +520,7 @@ func EncodePrivateKey(privKey []byte, net btcwire.BitcoinNet, compressed bool) (
// privKey, plus an optional byte (0x01) if copressed, plus 4 bytes of checksum. // privKey, plus an optional byte (0x01) if copressed, plus 4 bytes of checksum.
encodeLen := 37 encodeLen := 37
if compressed { if compressed {
encodeLen += 1 encodeLen++
} }
a := make([]byte, encodeLen, encodeLen) a := make([]byte, encodeLen, encodeLen)
a[0] = netID a[0] = netID