mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Minor naming and control flow changes to satisfy golint
This commit is contained in:
@@ -72,19 +72,19 @@ func (r *Route) Validate() error {
|
||||
|
||||
if r.Path == "" {
|
||||
return ErrRoutesMissingPath
|
||||
} else {
|
||||
u, err := url.Parse(r.Path)
|
||||
if err != nil {
|
||||
return ErrPathMalformed
|
||||
}
|
||||
}
|
||||
|
||||
if strings.Contains(u.Path, ":") {
|
||||
return ErrFoundDynamicURL
|
||||
}
|
||||
u, err := url.Parse(r.Path)
|
||||
if err != nil {
|
||||
return ErrPathMalformed
|
||||
}
|
||||
|
||||
if !path.IsAbs(u.Path) {
|
||||
return ErrRoutesInvalidPath
|
||||
}
|
||||
if strings.Contains(u.Path, ":") {
|
||||
return ErrFoundDynamicURL
|
||||
}
|
||||
|
||||
if !path.IsAbs(u.Path) {
|
||||
return ErrRoutesInvalidPath
|
||||
}
|
||||
|
||||
if r.Image == "" {
|
||||
|
||||
Reference in New Issue
Block a user