orchard create vm: support --image-pull-policy=Always (#110)

This commit is contained in:
Nikolay Edigaryev
2023-07-26 17:43:14 +04:00
committed by GitHub
parent fd88ce5890
commit 6759618f28
9 changed files with 199 additions and 18 deletions
+9 -3
View File
@@ -1,6 +1,7 @@
package structpath
import (
"fmt"
"reflect"
"strings"
)
@@ -23,9 +24,14 @@ func Lookup(target interface{}, path []string) (s string, ok bool) {
}
result, ok := currentValue.Interface().(string)
if !ok {
return "", false
if ok {
return result, true
}
return result, true
stringerResult, ok := currentValue.Interface().(fmt.Stringer)
if ok {
return stringerResult.String(), true
}
return "", false
}