loov / goda

Go Dependency Analysis toolkit
MIT License
1.37k stars 45 forks source link

Override documentation URL #30

Closed matt0x6F closed 4 years ago

matt0x6F commented 4 years ago

Feature Request We run our own internal GoDoc. Being able to point at that instead of pkg.go.dev would make this package usable in our GoDoc.

What's currently happening Clicking a node yields documentation for pkg.go.dev which only serves public packages

What you want to happen Be able to override the pkg.go.dev URL.

matt0x6F commented 4 years ago

If you let me know the desired argument name I can implement this.

egonelbre commented 4 years ago

I've been thinking a good name for this and thoughts about them:

  1. -link - is clear that it's linking something, but at the same time is harder to understand that this is where you replace the documentation server url.
  2. -href - matches the dot format, however isn't quite clear in what it does.
  3. -docs - is clear in the usage, but might be too specific for the needs. e.g. it wouldn't necessarily have to be a documentation server that the nodes link to. It could also link to github or something completely different.
  4. -docs-url - feels verbose and similar issues as 3.

Similarly the question is whether there's a need for customization in how it links. As an example, labels allow a template as the argument.

Based on this, I would think -docs is probably the clearest in purpose and usage. Also won't make it difficult to use something more complicated in the future.