You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rename the task/service/test package to task/service/taskservicetest
This has a few follow-on effects. Namely one no longer needs to have a special
name for the task/service/test package (previously this was custom named to
"taskServiceTest"). Now it just follows naturally as "taskservicetest" with no
custom naming required.
This change brings the name inline with current Go best practices for package
names and package naming, and also makes it easier for LSP-enabled editors to
automatically manage Go imports. In addition, it follows patterns found in the
Go stdlib (see httptest, slogtest, fstest, iotest, etc.) In general I would
have preferred to keep the name to the concatenation of only two package
names, but "service" is a very common package within platform, so I think it
makes sense to keep all three parts, as otherwise there would be four
"servicetest" packages[^2] and we'd be back to custom renaming the imports
which just makes things harder all around.
[^1]: https://go.dev/doc/effective_go#package-names
[^2]: `$ go list ./... | rg '/(task)?service/?test'`
0 commit comments