ostree: simplify VerifyRef() function

Return value of condition immediately
This commit is contained in:
Achilleas Koutsou 2022-01-17 18:39:04 +01:00 committed by Ondřej Budai
parent 923850ff1b
commit 7f69d56fc9

View file

@ -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) {