mirror of
https://github.com/opbnq-q/nto-cli.git
synced 2025-12-06 19:10:35 +07:00
feat: getting struct fields
This commit is contained in:
15
utils/contains_many.go
Normal file
15
utils/contains_many.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package utils
|
||||
|
||||
import "strings"
|
||||
|
||||
func ContainsMany(str string, substrs... string) bool {
|
||||
count := 0
|
||||
for _, substr := range substrs {
|
||||
if strings.Contains(str, substr) {
|
||||
count++;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return count == len(substrs)
|
||||
}
|
||||
Reference in New Issue
Block a user