adjust to ugly linting
This commit is contained in:
parent
e704e5adcc
commit
3c2493902d
3 changed files with 4 additions and 4 deletions
|
@ -61,7 +61,7 @@ func newActorID(validatedURI *url.URL, source string) (ActorID, error) {
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewPersonID(uri string, source string) (PersonID, error) {
|
func NewPersonID(uri, source string) (PersonID, error) {
|
||||||
// TODO: remove after test
|
// TODO: remove after test
|
||||||
//if !validation.IsValidExternalURL(uri) {
|
//if !validation.IsValidExternalURL(uri) {
|
||||||
// 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)
|
||||||
|
@ -85,7 +85,7 @@ func NewPersonID(uri string, source string) (PersonID, error) {
|
||||||
return personID, nil
|
return personID, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewRepositoryID(uri string, source string) (RepositoryID, error) {
|
func NewRepositoryID(uri, source string) (RepositoryID, error) {
|
||||||
if !validation.IsAPIURL(uri) {
|
if !validation.IsAPIURL(uri) {
|
||||||
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")
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ type Star struct {
|
||||||
|
|
||||||
// StarNew initializes a Star type activity
|
// StarNew initializes a Star type activity
|
||||||
// ToDo: May be used later in creating signed activities
|
// ToDo: May be used later in creating signed activities
|
||||||
func StarNew(id ap.ID, ob ap.ID) *Star {
|
func StarNew(id, ob ap.ID) *Star {
|
||||||
a := ap.ActivityNew(id, StarType, ob)
|
a := ap.ActivityNew(id, StarType, ob)
|
||||||
o := Star{Activity: *a, Source: ForgejoSourceType}
|
o := Star{Activity: *a, Source: ForgejoSourceType}
|
||||||
return &o
|
return &o
|
||||||
|
|
|
@ -21,7 +21,7 @@ func IsValid(v Validateable) (bool, error) {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func ValidateNotEmpty(value string, fieldName string) []string {
|
func ValidateNotEmpty(value, fieldName string) []string {
|
||||||
if value == "" {
|
if value == "" {
|
||||||
return []string{fmt.Sprintf("Field %v may not be empty", fieldName)}
|
return []string{fmt.Sprintf("Field %v may not be empty", fieldName)}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue