#code improvement
3 messages · Page 1 of 1 (latest)
I recommend using a struct to create the client to this service. Idk what it is exactly but it looks something like this:
type MyClient struct {
HTTPClient *http.Client
}
func (c *MyClient) GetReleases(ctx context.Context) (string, error) {
// make the query here
}
func (c *MyClient) GetVersions(ctx context.Context) ([]string, error) {
// make the query here
}