Skip to content

Conversation

@yin1999
Copy link

@yin1999 yin1999 commented Apr 30, 2025

Previously, the program determined whether a package was a std package by checking if there was a dot(".") in its package path. This method could easily lead to some local packages that didn’t follow that naming convention also being identified as std packages. The golang.org/x/tools/go/packages module supports loading "std" packages (an example), which can be used to load all standard packages and determine whether a package is a std package by checking for its existence.

Copy link
Collaborator

@ondrej-fabry ondrej-fabry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants