Total Lines | 16 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package internal |
||
2 | |||
3 | import ( |
||
4 | "github.com/gotilty/gotil/internal/errs" |
||
5 | ) |
||
6 | |||
7 | func Some(val, f interface{}) (bool, error) { |
||
8 | state := false |
||
9 | if err := Each(val, func(k, v interface{}) { |
||
10 | if check, _ := Includes(v, f); !check { |
||
11 | state = true |
||
12 | } |
||
13 | }); err == nil { |
||
14 | return state, err |
||
15 | } else { |
||
16 | return false, errs.NewUnsupportedTypeError(err.Error()) |
||
17 | } |
||
19 |