diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-12-08 20:09:26 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-12-08 20:09:26 +0800 |
commit | 0fe35b907addf1c066cb4d7c717bb23f9f2e7be4 (patch) | |
tree | ce23037c4256b7c1ec4561d7477c33b328aa81e8 /mobile/common.go | |
parent | 3fc7c978277051391f8ea7831559e9f4f83c3166 (diff) | |
download | go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.tar go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.tar.gz go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.tar.bz2 go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.tar.lz go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.tar.xz go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.tar.zst go-tangerine-0fe35b907addf1c066cb4d7c717bb23f9f2e7be4.zip |
mobile: iOS naming and API fixes for generators and Swift (#3408)
* build: modify the iOS namespace to iGeth (gomobile limitation)
* mobile: assign names to return types for ObjC wrapper
* mobile: use more expanded names for iOS/Swift API
Diffstat (limited to 'mobile/common.go')
-rw-r--r-- | mobile/common.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mobile/common.go b/mobile/common.go index ab1810bf1..779f22b4e 100644 --- a/mobile/common.go +++ b/mobile/common.go @@ -33,18 +33,18 @@ type Hash struct { } // NewHashFromBytes converts a slice of bytes to a hash value. -func NewHashFromBytes(hash []byte) (*Hash, error) { +func NewHashFromBytes(binary []byte) (hash *Hash, _ error) { h := new(Hash) - if err := h.SetBytes(hash); err != nil { + if err := h.SetBytes(binary); err != nil { return nil, err } return h, nil } // NewHashFromHex converts a hex string to a hash value. -func NewHashFromHex(hash string) (*Hash, error) { +func NewHashFromHex(hex string) (hash *Hash, _ error) { h := new(Hash) - if err := h.SetHex(hash); err != nil { + if err := h.SetHex(hex); err != nil { return nil, err } return h, nil @@ -95,7 +95,7 @@ func (h *Hashes) Size() int { } // Get returns the hash at the given index from the slice. -func (h *Hashes) Get(index int) (*Hash, error) { +func (h *Hashes) Get(index int) (hash *Hash, _ error) { if index < 0 || index >= len(h.hashes) { return nil, errors.New("index out of bounds") } @@ -108,18 +108,18 @@ type Address struct { } // NewAddressFromBytes converts a slice of bytes to a hash value. -func NewAddressFromBytes(address []byte) (*Address, error) { +func NewAddressFromBytes(binary []byte) (address *Address, _ error) { a := new(Address) - if err := a.SetBytes(address); err != nil { + if err := a.SetBytes(binary); err != nil { return nil, err } return a, nil } // NewAddressFromHex converts a hex string to a address value. -func NewAddressFromHex(address string) (*Address, error) { +func NewAddressFromHex(hex string) (address *Address, _ error) { a := new(Address) - if err := a.SetHex(address); err != nil { + if err := a.SetHex(hex); err != nil { return nil, err } return a, nil @@ -170,7 +170,7 @@ func (a *Addresses) Size() int { } // Get returns the address at the given index from the slice. -func (a *Addresses) Get(index int) (*Address, error) { +func (a *Addresses) Get(index int) (address *Address, _ error) { if index < 0 || index >= len(a.addresses) { return nil, errors.New("index out of bounds") } |