Commit 40070cc
committed
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'`1 parent 02a0627 commit 40070cc
3 files changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
0 commit comments