Fix some lints (#17337)

Fix some linting problems.
This commit is contained in:
Lunny Xiao 2021-10-18 03:47:12 +08:00 committed by GitHub
parent 5326f4c9c5
commit 4a57c9ea17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 14 additions and 15 deletions

View file

@ -52,9 +52,7 @@ func getRefURL(refURL, urlPrefix, repoFullName, sshDomain string) string {
urlPrefixHostname = prefixURL.Host
}
if strings.HasSuffix(urlPrefix, "/") {
urlPrefix = urlPrefix[:len(urlPrefix)-1]
}
urlPrefix = strings.TrimSuffix(urlPrefix, "/")
// FIXME: Need to consider branch - which will require changes in modules/git/commit.go:GetSubModules
// Relative url prefix check (according to git submodule documentation)