MCPcopy Index your code
hub / github.com/coder/coder / portExplicitFromInvocation

Function portExplicitFromInvocation

scripts/develop/main.go:283–290  ·  view source on GitHub ↗
(inv *serpent.Invocation)

Source from the content-addressed store, hash-verified

281)
282
283func 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
292func isPortExplicit(inv *serpent.Invocation, flagName, envName string) bool {
293 if flag := inv.ParsedFlags().Lookup(flagName); flag != nil && flag.Changed {

Callers 1

mainFunction · 0.85

Calls 1

isPortExplicitFunction · 0.85

Tested by

no test coverage detected