getPort returns the debug port
()
| 103 | |
| 104 | // getPort returns the debug port |
| 105 | func (d *debugConfig) getPort() int { |
| 106 | // Check BPL_DEBUG_PORT first (Cloud Native Buildpacks convention) |
| 107 | bplPort := os.Getenv("BPL_DEBUG_PORT") |
| 108 | if bplPort != "" { |
| 109 | if port, err := strconv.Atoi(bplPort); err == nil && port > 0 { |
| 110 | return port |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | return d.Port |
| 115 | } |
| 116 | |
| 117 | // getSuspend returns whether to suspend on start |
| 118 | func (d *debugConfig) getSuspend() bool { |