8000 x/tools/cmd/godoc: request for richer formatting · Issue #16666 · golang/go · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
x/tools/cmd/godoc: request for richer formatting #16666
Closed as not planned
Closed as not planned
@aeneasr

Description

@aeneasr

Documenting Go code is not fun. At all. That this benefits bad behaviour (:= no/little docs) is obvious.

  1. It's not clear in which path your documentation will be available when running godoc -http=:6060. I had to ask in slack to find out it's localhost:6060/pkg/github.com/foo/bar. I tried variations like localhost:6060/github.com/foo/bar or localhost:6060/src/github.com/foo/bar which obviously didn't work.

  2. Not having lists around is a real pain. How am I supposed to do something like this:

    // Package warden decides if access requests should be allowed or denied. In a scientific taxonomy, the warden
    // is classified as a Policy Decision Point. The warden's primary goal is to implement `github.com/ory-am/hydra/firewall.Firewall`.
    //
    // This package is structured as follows:
    // * handler.go: A HTTP handler capable of validating access tokens.
    // * warden_http.go: A Go API using HTTP to validate access tokens.
    // * warden_local.go: A Go API using storage managers to validate access tokens.
    // * warden_test.go: Functional tests all of the above.
    
  3. It's not clear (to me) how to link from package a to package b and get that working in both godoc.org and with godoc.

  4. I can't link text.

  5. I can't load images.

  6. There is no emphasis, I overread important things all the time because I'm too lazy concentrating on 10 lines of plain text when a simple Note: Don't do this if XYZ would most certainly solve that.

  7. There is no instruction for inheritance, for example when implementing interfaces.

  8. No inline code.

  9. Probably more stuff (feel free to extend) but it's late and I'm tired and frustrated.

My suggestion is to have markdown or simple HTML, it would solve almost all of the problems above and a godoc command that actually does what it says: serving the docs of the cwd (and optionally other GOPATH packages too).

The issue number (it's a sign) gives me hope that documenting go code will get better soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change ca 3AB1 n be made.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0