mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Discard null values from scraper results (#1374)
This commit is contained in:
@@ -69,6 +69,17 @@ func StrUnique(vs []string) []string {
|
||||
return ret
|
||||
}
|
||||
|
||||
// StrDelete returns the vs string slice with toDel values removed.
|
||||
func StrDelete(vs []string, toDel string) []string {
|
||||
var ret []string
|
||||
for _, v := range vs {
|
||||
if v != toDel {
|
||||
ret = append(ret, v)
|
||||
}
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
// StringSliceToIntSlice converts a slice of strings to a slice of ints.
|
||||
// Returns an error if any values cannot be parsed.
|
||||
func StringSliceToIntSlice(ss []string) ([]int, error) {
|
||||
|
||||
Reference in New Issue
Block a user