Files
podman/vendor/github.com/crc-org/vfkit/pkg/util/strings.go
Brent Baude 4e96686e9d AppleHV enablement pass #2
* Use vfkit command line assembly
* Inject ignition file into guest using http over vsock
* Ready notification through use of vsock

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-07-11 06:36:10 -05:00

24 lines
345 B
Go

package util
import "strings"
func TrimQuotes(str string) string {
if strings.HasPrefix(str, `"`) && strings.HasSuffix(str, `"`) {
str = strings.Trim(str, `"`)
}
return str
}
func StringInSlice(st string, sl []string) bool {
if sl == nil {
return false
}
for _, s := range sl {
if st == s {
return true
}
}
return false
}