remove custom contains funcs for slices.Contains (#2015)

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby 2024-07-19 09:04:04 +02:00 committed by GitHub
parent 9e523d4687
commit 11fde62b8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 26 deletions

View file

@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"os"
"reflect"
"github.com/rs/zerolog/log"
"google.golang.org/grpc"
@ -197,13 +196,3 @@ func (t tokenAuth) GetRequestMetadata(
func (tokenAuth) RequireTransportSecurity() bool {
return true
}
func contains[T string](ts []T, t T) bool {
for _, v := range ts {
if reflect.DeepEqual(v, t) {
return true
}
}
return false
}