1
0
Fork 0
mirror of https://github.com/pomerium/pomerium.git synced 2025-07-12 22:38:21 +02:00
pomerium/pkg/envoy/misc.go
Kenneth Jenkins a3149363a6
envoyconfig: address strconv.Atoi warnings ()
Replace Atoi() calls with ParseUint(), and update the buildAddress()
defaultPort parameter to be a uint32. (A uint16 would arguably make more
sense for a port number, but uint32 matches the Envoy proto field.)

Delete a ParseAddress() method that appears to be unused.
2024-04-26 09:38:41 -07:00

10 lines
146 B
Go

package envoy
func firstNonEmpty[T interface{ ~string }](args ...T) T {
for _, a := range args {
if a != "" {
return a
}
}
return ""
}