Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

godoc doesn't process client method documentation anymore #2

Closed
icedream opened this issue Jun 25, 2016 · 3 comments
Closed

godoc doesn't process client method documentation anymore #2

icedream opened this issue Jun 25, 2016 · 3 comments
Assignees

Comments

@icedream
Copy link
Owner

icedream commented Jun 25, 2016

Due to pull request #1 abstracting away all methods into an interface, the implemented methods no longer are formatted as such in the resulting godoc HTML, instead the documentation is shown as Go comment unprocessed which is less intuitive and generally not as nice to read.

Possible solutions:

  • Remove the intermediate interface and instead make Client struct be able to deal with raw initialization through go's new(...) (in order to reduce redundancy we would deprecate NewClient respectively and support an alternative to setting the HTTP client like SetHttpClient).
  • Keep as is (without nice formatting/processing of documentation).
@icedream icedream self-assigned this Jun 25, 2016
@programaths
Copy link
Contributor

Looks like a bug in Godoc and it will be adressed "one day": golang/gddo#313

Also, as the endpoint is unique, we could do the same than HTTP API: providing methods at package level which would use a default client (which in turn would use the default HttpClient).
(See https://golang.org/src/net/http/server.go?s=57817:57861#L1951)

@icedream
Copy link
Owner Author

Sad to see this being a long-standing issue that isn't tackled at the moment - the most relevant issue for this would be golang/go#5860 which has been open for almost 3 years.

Providing methods at package level is a good idea independent from the issue, also considering how packages like "log" solve it as well.

@icedream icedream added this to the v0.1.0 milestone Sep 4, 2016
@icedream
Copy link
Owner Author

icedream commented Sep 4, 2016

Now that I have time for the project again I would go ahead and implement the methods at package level. I guess the easiest way would be to set up a DefaultClient variable and just wrap all provided methods.

@icedream icedream removed this from the v0.1.0 milestone Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants