ostree: simplify VerifyRef() function
Return value of condition immediately
This commit is contained in:
parent
923850ff1b
commit
7f69d56fc9
1 changed files with 1 additions and 4 deletions
|
|
@ -20,10 +20,7 @@ type RequestParams struct {
|
|||
}
|
||||
|
||||
func VerifyRef(ref string) bool {
|
||||
if len(ref) > 0 && ostreeRefRE.MatchString(ref) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return len(ref) > 0 && ostreeRefRE.MatchString(ref)
|
||||
}
|
||||
|
||||
func ResolveRef(location, ref string) (string, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue