adlio / trello

Trello API wrapper for Go
MIT License
220 stars 71 forks source link

re-add client on search endpoint #13

Closed luccacabra closed 6 years ago

luccacabra commented 6 years ago

Currently, if a list of Board objects is retrieved via the search endpoint, we're not re-adding the client variable back into the board, which results in nil pointer errors:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x135f332]

goroutine 1 [running]:
github.com/luccacabra/trello.(*Client).Throttle(...)
    github.com/luccacabra/trello/client.go:56
github.com/luccacabra/trello.(*Client).Get(0x0, 0xc42001c360, 0x25, 0xc42010dd30, 0x1393980, 0xc4201e2240, 0x0, 0x0)
    github.com/luccacabra/trello/client.go:64 +0x52
github.com/luccacabra/trello.(*Board).GetLists(0xc4200926c0, 0xc42010dd30, 0xc42010dd30, 0xc42010dd60, 0xc42010dd30, 0x0, 0x13ab2e0)
    github.com/luccacabra/trello/list.go:40 +0x107
main.TrelloBoard(0xc420014900, 0x20, 0xc420018280, 0x40, 0xc420016958, 0x4, 0x0, 0x0, 0x0, 0x0, ...)
...
coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.07%) to 70.144% when pulling 2b95606f1d12b39b1701fea99e4d5aee723c9cf9 on luccacabra:search-boards-client into 47013893283bbc3b8d98f5f612c04a18f8ef227b on adlio:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.07%) to 70.144% when pulling 2b95606f1d12b39b1701fea99e4d5aee723c9cf9 on luccacabra:search-boards-client into 47013893283bbc3b8d98f5f612c04a18f8ef227b on adlio:master.

adlio commented 6 years ago

Thank you @luccacabra. Oversight on my part, I haven't used the search APIs much. Merging.