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

x/website: Add information about idiomatic usage of internal packages #47178

Closed
mickeyreiss opened this issue Jul 13, 2021 · 3 comments
Closed
Labels
Documentation FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@mickeyreiss
Copy link
Contributor

I am not able to find any mention of "Internal" packages in effective go.

In my mind, this feature is relevant for large codebases and libraries intended for public consumption. This way, developers can express which APIs are included in their package's compatibility promise.

It would be great if there were official recommendations regarding this feature.

Additionally, I was not able to find a reference to this feature in the spec, although I do see it announced as a generally available feature in the go1.4 release notes.

@gopherbot gopherbot added this to the Unreleased milestone Jul 13, 2021
@fzipp
Copy link
Contributor

fzipp commented Jul 13, 2021

Additionally, I was not able to find a reference to this feature in the spec

The spec would be the wrong place. Internal directories are not a language feature, but a feature of the go tool.
https://pkg.go.dev/cmd/go#hdr-Internal_Directories

@cherrymui
Copy link
Member

"Effective Go" doesn't seem to cover package layouts. So mentioning internal packages seems beyond the scope of that article.

As @fzipp noted, it is documented with the cmd/go command.

@mickeyreiss is there any other suggestions about internal packages? Otherwise we can close this. Thanks.

@cherrymui cherrymui added Documentation WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jul 13, 2021
@mickeyreiss
Copy link
Contributor Author

Thanks for the responses.

is there any other suggestions about internal packages?

My only suggestion is to provide guidance somewhere about the idiomatic usage: Are there any pitfalls or recommendations for using internal packages?

@golang golang locked and limited conversation to collaborators Jul 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants