isEnabled checks if debugging is enabled
()
| 89 | |
| 90 | // isEnabled checks if debugging is enabled |
| 91 | func (d *debugConfig) isEnabled() bool { |
| 92 | // Check BPL_DEBUG_ENABLED first (Cloud Native Buildpacks convention) |
| 93 | bplEnabled := os.Getenv("BPL_DEBUG_ENABLED") |
| 94 | if bplEnabled == "true" || bplEnabled == "1" { |
| 95 | return true |
| 96 | } |
| 97 | if bplEnabled == "false" || bplEnabled == "0" { |
| 98 | return false |
| 99 | } |
| 100 | |
| 101 | return d.Enabled |
| 102 | } |
| 103 | |
| 104 | // getPort returns the debug port |
| 105 | func (d *debugConfig) getPort() int { |