From 67a47e6a0bf474a76f6a8f09b39cfdf382f39b90 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Sat, 6 Jan 2018 16:05:50 -0500 Subject: [PATCH] Address is a type alias --- pub_key.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pub_key.go b/pub_key.go index cda01a9df..32c0b3237 100644 --- a/pub_key.go +++ b/pub_key.go @@ -16,7 +16,8 @@ import ( // An address is a []byte, but hex-encoded even in JSON. // []byte leaves us the option to change the address length. -type Address cmn.HexBytes +// Use an alias so Unmarshal methods (with ptr receivers) are available too. +type Address = cmn.HexBytes func PubKeyFromBytes(pubKeyBytes []byte) (pubKey PubKey, err error) { if err := wire.ReadBinaryBytes(pubKeyBytes, &pubKey); err != nil {