We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When the import path doesn't match the package name, it's a good idea to alias the import to be more explicit.
Here's an example with github.com/testcontainers/testcontainers-go (which defines a package testcontainers):
github.com/testcontainers/testcontainers-go
testcontainers
import "github.com/testcontainers/testcontainers-go"
should be aliased to
import testcontainers "github.com/testcontainers/testcontainers-go"
Both imports are equivalent, because in both files, package can be accessed as testcontainers.
On the other hand, if the package is already aliased like in the following example, gofumpt should not change the alias:
gofumpt
import tc "github.com/testcontainers/testcontainers-go"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When the import path doesn't match the package name, it's a good idea to alias the import to be more explicit.
Here's an example with
github.com/testcontainers/testcontainers-go
(which defines a packagetestcontainers
):should be aliased to
Both imports are equivalent, because in both files, package can be accessed as
testcontainers
.On the other hand, if the package is already aliased like in the following example,
gofumpt
should not change the alias:The text was updated successfully, but these errors were encountered: