1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-21 08:31:27 -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)
//}
validatedUri, _ := url.Parse(uri)
validatedUri, _ := url.Parse(uri) // ToDo: Why no err treatment at this place?
pathWithActorID := strings.Split(validatedUri.Path, "/")
if containsEmptyString(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")
}
validatedUri, _ := url.Parse(uri)
validatedUri, _ := url.Parse(uri) // ToDo: Why no err treatment at this place?
pathWithActorID := strings.Split(validatedUri.Path, "/")
if containsEmptyString(pathWithActorID) {
pathWithActorID = removeEmptyStrings(pathWithActorID)