Replies: 1 comment 1 reply
-
|
Sounds good. Maybe start with a small pull request. Avoid breaking changes if possible. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey folks,
I'm starting to use the Go
miniflux.app/clientmodule to build on the API of my miniflux instance, but I'm missing a couple of things and I'd like to add them. Curious to hear any reservations.First, I would like to be able to pass an
http.Clientto the client. This allows me to keep track of some metrics and it's also pretty common for Go clients. In order to do this, I was considering using the common functional options pattern. So we would end up with a function like,and the common usage would be
I would also update
NewClientto call this new function under the hood.Second, I'd like to be able to have a proper
context.Contextfor each of the methods onClient. This is very common in Go clients, of course, and it enables the usual benefits of having a context, including finer grained control of timeouts.In order to do this, I'm proposing that we add a
*Contextvariant of every method that takes in acontext.Contextas the first parameter. For instance,would get a sibling method,
In fact,
Feedswould now be implemented as,I have started a branch with these changes but since it ends up being a reasonably sized diff, I wanted to reach out before I get too far.
Beta Was this translation helpful? Give feedback.
All reactions