mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-07 14:05:50 +00:00
add new unit tests in auth_handler_test.go
This commit is contained in:
14
internal/testutil/string_slice.go
Normal file
14
internal/testutil/string_slice.go
Normal file
@@ -0,0 +1,14 @@
|
||||
// Copyright 2023 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package testutil
|
||||
|
||||
import "fmt"
|
||||
|
||||
func AddPrefixToEach(prefix string, addToEach []string) []string {
|
||||
result := make([]string, len(addToEach))
|
||||
for i, s := range addToEach {
|
||||
result[i] = fmt.Sprintf("%s%s", prefix, s)
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user