You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The technical debt of the go-enf library will be tracked in this issue. Additional tasks should be added when needed.
Code cleanup
Add testing boilerplate (lots of redundant code with setting up test cases)
Generalize response struct (parametrize the type of the struct in the data property)
Standardize printf formatters (in some places we use %v for strings instead of %s, %+v in test cases, etc.) --- look into go-spew for pretty printing of structs.
Keep same tabs/spaces for json string literals in test files
Consider changing the Domains property of the Client to Domain
Testing
Improve test coverage. (Current coverage at ~ 58%)
Integration Tests(?)
Find out more composable way to perform unit testing
Remove the RequestBody field from the TestParams struct --- it's not needed.
Documentation
Add documentation to this library at docs.xaptum.com
Have comments on all exported methods/structs
New features
Make authenticating/creating a new client simpler (compared to other clients like the Stripe API, go-enf is a tad complex)
We should probably give users of go-enf access to the entire response object --- I believe some structs only have a subset of the fields.
Think about changing the response body of all the methods to exactly model the HTTP response. Other APIs (like Scale) do this, and it ensures the documentation is more accurate for the Go library. I.e.
typeResponsestruct {
Data []interface{} `json:"data"`Pagemap[string]interface{} `json:"page"`
}
Re-order the argument list in the get, post etc. helper functions to model this flow: Path, Request, Response.
Look at having the methods model the same structure as the API docs. For example, we should have Network.GetDomain instead of Domains.GetDomain, since the API docs list the GetDomain method under the Network subsection.
The technical debt of the
go-enflibrary will be tracked in this issue. Additional tasks should be added when needed.Code cleanup
dataproperty)printfformatters (in some places we use %v for strings instead of %s, %+v in test cases, etc.) --- look intogo-spewfor pretty printing of structs.Domainsproperty of the Client toDomainTesting
RequestBodyfield from theTestParamsstruct --- it's not needed.Documentation
docs.xaptum.comNew features
go-enfis a tad complex)go-enfaccess to the entire response object --- I believe some structs only have a subset of the fields.get,postetc. helper functions to model this flow: Path, Request, Response.Network.GetDomaininstead ofDomains.GetDomain, since the API docs list theGetDomainmethod under theNetworksubsection.