16 lines
430 B
Go
16 lines
430 B
Go
package main
|
|
|
|
import "strconv"
|
|
|
|
// probeParsePort is a THROWAWAY used only to validate Gadfly's inline-review
|
|
// anchoring end-to-end (this branch is never merged). It deliberately ignores
|
|
// the error from Atoi and hardcodes a fallback, so the swarm has a concrete
|
|
// finding to anchor an inline comment to on a changed line.
|
|
func probeParsePort(s string) int {
|
|
n, _ := strconv.Atoi(s)
|
|
if n == 0 {
|
|
return 8080
|
|
}
|
|
return n
|
|
}
|