1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-15 00:15:00 +02:00

Add validation for Headers struct

This commit is contained in:
Joel Speed
2020-07-23 10:47:31 +01:00
parent 2dc0d1e7ee
commit d26c65ba8d
4 changed files with 120 additions and 0 deletions

11
pkg/validation/utils.go Normal file
View File

@ -0,0 +1,11 @@
package validation
func prefixValues(prefix string, values ...string) []string {
msgs := []string{}
for _, value := range values {
if value != "" {
msgs = append(msgs, prefix+value)
}
}
return msgs
}