Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

proposal: specify renamed imports in examples #647

Open
gbbr opened this issue Sep 10, 2019 · 0 comments
Open

proposal: specify renamed imports in examples #647

gbbr opened this issue Sep 10, 2019 · 0 comments

Comments

@gbbr
Copy link
Member

gbbr commented Sep 10, 2019

Code example that use named import paths can render the code confusing because it is unclear to the reader which package the import refers to. Regardless of whether these are considered an anti-pattern or not, it's a valid use case and it would be helpful to cover for.

Example documentation with the problem: https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/contrib/gorilla/mux.

A possible solution would be:

Screenshot 2019-09-10 at 11 32 19

Where this would be shown only for named imports.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant