Skip to content

v0.0.2-rc WIP embedded client interface

Pre-release
Pre-release
Compare
Choose a tag to compare
@marz619 marz619 released this 04 Feb 14:21
· 10 commits to main since this release

see 2f17c66 for more details ...

WIP: creating a new private client interface that satisifies:

get(string, interface{}) error  // to get and unmarshal a response
set(client)                     // to embed the `client`

This interfaces satisifed by clientImpl are both the public Client
and private client interfaces

This allows us to embed the HTTPClient into the base Output struct
which then means we can provide convenience methods to retrieve nested
feeds from the root GBFS type.

see the new Feeds type for an example of this pattern; and take a look
at example/example.go