vendor: add qingstor-sdk-go for QingStor
This commit is contained in:
parent
f682002b84
commit
466dd22b44
136 changed files with 15952 additions and 1 deletions
41
vendor/github.com/pengsrc/go-shared/check/slice.go
generated
vendored
Normal file
41
vendor/github.com/pengsrc/go-shared/check/slice.go
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
package check
|
||||
|
||||
// StringSliceContains iterates over the slice to find the target.
|
||||
func StringSliceContains(slice []string, target string) bool {
|
||||
for _, v := range slice {
|
||||
if v == target {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// IntSliceContains iterates over the slice to find the target.
|
||||
func IntSliceContains(slice []int, target int) bool {
|
||||
for _, v := range slice {
|
||||
if v == target {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Int32SliceContains iterates over the slice to find the target.
|
||||
func Int32SliceContains(slice []int32, target int32) bool {
|
||||
for _, v := range slice {
|
||||
if v == target {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Int64SliceContains iterates over the slice to find the target.
|
||||
func Int64SliceContains(slice []int64, target int64) bool {
|
||||
for _, v := range slice {
|
||||
if v == target {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue