Add secured subrouter for REST API

Rename IP filter option
Add array helper in util
This commit is contained in:
2023-08-14 14:33:05 +02:00
parent 42e05fc999
commit 90bdfcfbb6
3 changed files with 135 additions and 84 deletions

14
internal/util/array.go Normal file
View File

@@ -0,0 +1,14 @@
// Copyright (C) 2023 NHR@FAU, University Erlangen-Nuremberg.
// All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package util
func Contains[T comparable](items []T, item T) bool {
for _, v := range items {
if v == item {
return true
}
}
return false
}