mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-28 18:06:34 +02:00
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.
10 lines
146 B
Go
10 lines
146 B
Go
package envoy
|
|
|
|
func firstNonEmpty[T interface{ ~string }](args ...T) T {
|
|
for _, a := range args {
|
|
if a != "" {
|
|
return a
|
|
}
|
|
}
|
|
return ""
|
|
}
|