internal/source: clean up redundancies and typos after CL 708175
Remove redundant assignment of repoSubdir and redundant break in
switch statement in internal/source/meta-tags.go.
Fix typos in comments ("minium" -> "minimum").
diff --git a/internal/source/meta-tags.go b/internal/source/meta-tags.go
index d1c271e..cc32064 100644
--- a/internal/source/meta-tags.go
+++ b/internal/source/meta-tags.go
@@ -102,10 +102,9 @@
repoSubdir := ""
switch len(fields) {
case 3:
- // go-import meta tag support minium 3 fields (root-path vcs repo-url).
- break // good to proceed
+ // go-import meta tag support minimum 3 fields (root-path vcs repo-url).
case 4:
- // go-import meta tag support minium 3 fields (root-path vcs repo-url), and additionally "subdirectory" field since Go 1.25.
+ // go-import meta tag support minimum 3 fields (root-path vcs repo-url), and additionally "subdirectory" field since Go 1.25.
repoSubdir = fields[3]
default:
errorMessage = "go-import meta tag content attribute does not have three or four fields"
@@ -149,7 +148,6 @@
break metaScan
}
repoURL = sm.repoURL
- repoSubdir = sm.repoSubdir
}
sm = &sourceMeta{
repoRootPrefix: repoRootPrefix,
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +2 |
// go-import meta tag support minimum 3 fields (root-path vcs repo-url).Should be `supports` I think. Maybe `supports a minimum of 3 fields` would read clearer too.
Same below.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Kokoro presubmit build finished with status: SUCCESS
Logs at: https://source.cloud.google.com/results/invocations/690632b6-cea4-417d-b482-6a0aead27bd6
| kokoro-CI | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
// go-import meta tag support minimum 3 fields (root-path vcs repo-url).Should be `supports` I think. Maybe `supports a minimum of 3 fields` would read clearer too.
Same below.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Kokoro presubmit build finished with status: SUCCESS
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Removed LUCI-TryBot-Result-1 by golang...@luci-project-accounts.iam.gserviceaccount.com <golang...@luci-project-accounts.iam.gserviceaccount.com>
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
1 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: internal/source/meta-tags.go
Insertions: 2, Deletions: 2.
@@ -102,9 +102,9 @@
repoSubdir := ""
switch len(fields) {
case 3:
- // go-import meta tag support minimum 3 fields (root-path vcs repo-url).
+ // go-import meta tag supports a minimum of 3 fields (root-path vcs repo-url).
case 4:
- // go-import meta tag support minimum 3 fields (root-path vcs repo-url), and additionally "subdirectory" field since Go 1.25.
+ // go-import meta tag supports a minimum of 3 fields (root-path vcs repo-url), and additionally "subdirectory" field since Go 1.25.
repoSubdir = fields[3]
default:
errorMessage = "go-import meta tag content attribute does not have three or four fields"
```
internal/source: clean up redundancies and typos after CL 708175
Remove redundant assignment of repoSubdir and redundant break in
switch statement in internal/source/meta-tags.go.
Fix typos in comments ("minium" -> "minimum").
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |