mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-06 15:22:47 +01:00
Replace interface{} with any (#538)
Co-authored-by: Jonas Plum <git@jonasplum.de>
This commit is contained in:
@@ -693,9 +693,9 @@ func (s *aqlInterpreter) function(ctx *parser.Function_callContext) {
|
||||
}
|
||||
}
|
||||
|
||||
func unique(array []interface{}) []interface{} {
|
||||
seen := map[interface{}]bool{}
|
||||
var filtered []interface{}
|
||||
func unique(array []any) []any {
|
||||
seen := map[any]bool{}
|
||||
var filtered []any
|
||||
for _, e := range array {
|
||||
_, ok := seen[e]
|
||||
if !ok {
|
||||
@@ -707,7 +707,7 @@ func unique(array []interface{}) []interface{} {
|
||||
return filtered
|
||||
}
|
||||
|
||||
func contains(values []interface{}, e interface{}) bool {
|
||||
func contains(values []any, e any) bool {
|
||||
for _, v := range values {
|
||||
if e == v {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user