pomerium/pkg/envoy/misc.go
Kenneth Jenkins d4d18c4067 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-25 14:53:20 -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 ""
}