Replace interface{} with any (#538)

Co-authored-by: Jonas Plum <git@jonasplum.de>
This commit is contained in:
Jonas Plum
2022-10-22 14:50:09 +02:00
committed by GitHub
parent 9200c865f8
commit fb69a1a07b
6 changed files with 192 additions and 193 deletions

View File

@@ -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