MCPcopy Index your code
hub / github.com/cli/cli / IsDebugEnabled

Function IsDebugEnabled

utils/utils.go:10–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8)
9
10func IsDebugEnabled() (bool, string) {
11 debugValue, isDebugSet := os.LookupEnv("GH_DEBUG")
12 legacyDebugValue := os.Getenv("DEBUG")
13
14 if !isDebugSet {
15 switch legacyDebugValue {
16 case "true", "1", "yes", "api":
17 return true, legacyDebugValue
18 default:
19 return false, legacyDebugValue
20 }
21 }
22
23 switch debugValue {
24 case "false", "0", "no", "":
25 return false, debugValue
26 default:
27 return true, debugValue
28 }
29}
30
31var TerminalSize = func(w interface{}) (int, int, error) {
32 if f, isFile := w.(*os.File); isFile {

Callers 7

NewCmdExtensionFunction · 0.92
NewHandlerFunction · 0.92
MainFunction · 0.92
OutputMethod · 0.92
RunMethod · 0.92
NewHTTPClientFunction · 0.92
NewExternalHTTPClientFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected