1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-28 09:21:13 -05:00

Add questions for review discussion

This commit is contained in:
erik 2023-12-19 10:55:30 +01:00 committed by Michael Jerger
parent 8a8b6821ba
commit 0378b2dc7d

View file

@ -36,7 +36,7 @@ func NewPersonId(uri string, source string) (PersonId, error) {
// return PersonId{}, fmt.Errorf("uri %s is not a valid external url", uri) // return PersonId{}, fmt.Errorf("uri %s is not a valid external url", uri)
//} //}
validatedUri, _ := url.Parse(uri) validatedUri, _ := url.Parse(uri) // ToDo: Why no err treatment at this place?
pathWithActorID := strings.Split(validatedUri.Path, "/") pathWithActorID := strings.Split(validatedUri.Path, "/")
if containsEmptyString(pathWithActorID) { if containsEmptyString(pathWithActorID) {
pathWithActorID = removeEmptyStrings(pathWithActorID) pathWithActorID = removeEmptyStrings(pathWithActorID)
@ -66,7 +66,7 @@ func NewRepositoryId(uri string, source string) (RepositoryId, error) {
return RepositoryId{}, fmt.Errorf("uri %s is not a valid repo url on this host %s", uri, setting.AppURL+"api") return RepositoryId{}, fmt.Errorf("uri %s is not a valid repo url on this host %s", uri, setting.AppURL+"api")
} }
validatedUri, _ := url.Parse(uri) validatedUri, _ := url.Parse(uri) // ToDo: Why no err treatment at this place?
pathWithActorID := strings.Split(validatedUri.Path, "/") pathWithActorID := strings.Split(validatedUri.Path, "/")
if containsEmptyString(pathWithActorID) { if containsEmptyString(pathWithActorID) {
pathWithActorID = removeEmptyStrings(pathWithActorID) pathWithActorID = removeEmptyStrings(pathWithActorID)