new type + additional methods

This commit is contained in:
obscuren
2015-03-16 11:59:52 +01:00
parent b523441361
commit f486c0ae56
7 changed files with 107 additions and 62 deletions

View File

@ -211,7 +211,7 @@ func RightPadString(str string, l int) string {
}
func Address(slice []byte) (addr []byte) {
func ToAddress(slice []byte) (addr []byte) {
if len(slice) < 20 {
addr = LeftPadBytes(slice, 20)
} else if len(slice) > 20 {