Skip to content

Commit fd34bf5

Browse files
kielbarryskylenet
authored andcommitted
contracts/*: golint updates for this or self warning
(cherry picked from commit 53b823a)
1 parent 9962301 commit fd34bf5

File tree

6 files changed

+194
-209
lines changed

6 files changed

+194
-209
lines changed

contracts/chequebook/api.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,40 +27,40 @@ const Version = "1.0"
2727

2828
var errNoChequebook = errors.New("no chequebook")
2929

30-
type Api struct {
30+
type API struct {
3131
chequebookf func() *Chequebook
3232
}
3333

34-
func NewApi(ch func() *Chequebook) *Api {
35-
return &Api{ch}
34+
func NewAPI(ch func() *Chequebook) *API {
35+
return &API{ch}
3636
}
3737

38-
func (self *Api) Balance() (string, error) {
39-
ch := self.chequebookf()
38+
func (a *API) Balance() (string, error) {
39+
ch := a.chequebookf()
4040
if ch == nil {
4141
return "", errNoChequebook
4242
}
4343
return ch.Balance().String(), nil
4444
}
4545

46-
func (self *Api) Issue(beneficiary common.Address, amount *big.Int) (cheque *Cheque, err error) {
47-
ch := self.chequebookf()
46+
func (a *API) Issue(beneficiary common.Address, amount *big.Int) (cheque *Cheque, err error) {
47+
ch := a.chequebookf()
4848
if ch == nil {
4949
return nil, errNoChequebook
5050
}
5151
return ch.Issue(beneficiary, amount)
5252
}
5353

54-
func (self *Api) Cash(cheque *Cheque) (txhash string, err error) {
55-
ch := self.chequebookf()
54+
func (a *API) Cash(cheque *Cheque) (txhash string, err error) {
55+
ch := a.chequebookf()
5656
if ch == nil {
5757
return "", errNoChequebook
5858
}
5959
return ch.Cash(cheque)
6060
}
6161

62-
func (self *Api) Deposit(amount *big.Int) (txhash string, err error) {
63-
ch := self.chequebookf()
62+
func (a *API) Deposit(amount *big.Int) (txhash string, err error) {
63+
ch := a.chequebookf()
6464
if ch == nil {
6565
return "", errNoChequebook
6666
}

0 commit comments

Comments
 (0)