(inv *serpent.Invocation)
| 281 | ) |
| 282 | |
| 283 | func portExplicitFromInvocation(inv *serpent.Invocation) portExplicit { |
| 284 | return portExplicit{ |
| 285 | api: isPortExplicit(inv, "port", "CODER_DEV_PORT"), |
| 286 | web: isPortExplicit(inv, "web-port", "CODER_DEV_WEB_PORT"), |
| 287 | proxy: isPortExplicit(inv, "proxy-port", "CODER_DEV_PROXY_PORT"), |
| 288 | metrics: isPortExplicit(inv, "prometheus-port", "CODER_DEV_PROMETHEUS_PORT"), |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | func isPortExplicit(inv *serpent.Invocation, flagName, envName string) bool { |
| 293 | if flag := inv.ParsedFlags().Lookup(flagName); flag != nil && flag.Changed { |
no test coverage detected