MCPcopy Create free account
hub / github.com/AndroidPoet/playconsole-cli / ResolveTimeout

Function ResolveTimeout

internal/cli/shared.go:79–90  ·  view source on GitHub ↗

ResolveTimeout returns an explicit user timeout when present, otherwise fallback.

(fallback time.Duration)

Source from the content-addressed store, hash-verified

77
78// ResolveTimeout returns an explicit user timeout when present, otherwise fallback.
79func ResolveTimeout(fallback time.Duration) time.Duration {
80 if timeout == "" {
81 return fallback
82 }
83
84 parsed, err := time.ParseDuration(timeout)
85 if err != nil || parsed <= 0 {
86 return fallback
87 }
88
89 return parsed
90}
91
92// IsDryRun returns whether dry-run mode is enabled
93func IsDryRun() bool {

Callers 5

NewClientFunction · 0.92
NewReportingClientFunction · 0.92
fetchAppsFunction · 0.92

Calls

no outgoing calls