mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 00:20:50 +00:00
enhance test & fix reviews
This commit is contained in:
parent
33648f2a4c
commit
fc38e56373
12 changed files with 101 additions and 20 deletions
|
@ -32,8 +32,8 @@ func NewActorID(uri string) (ActorID, error) {
|
|||
return ActorID{}, err
|
||||
}
|
||||
|
||||
if valid, outcome := validation.IsValid(result); !valid {
|
||||
return ActorID{}, outcome
|
||||
if valid, err := validation.IsValid(result); !valid {
|
||||
return ActorID{}, err
|
||||
}
|
||||
|
||||
return result, nil
|
||||
|
@ -83,8 +83,8 @@ func NewPersonID(uri, source string) (PersonID, error) {
|
|||
|
||||
// validate Person specific path
|
||||
personID := PersonID{result}
|
||||
if valid, outcome := validation.IsValid(personID); !valid {
|
||||
return PersonID{}, outcome
|
||||
if valid, err := validation.IsValid(personID); !valid {
|
||||
return PersonID{}, err
|
||||
}
|
||||
|
||||
return personID, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue