pomerium/pkg/envoy/misc.go
Kenneth Jenkins a3149363a6
envoyconfig: address strconv.Atoi warnings (#5076)
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 ""
}