(candidate string)
| 224 | } |
| 225 | |
| 226 | func resolveExecutable(candidate string) (string, bool) { |
| 227 | if strings.TrimSpace(candidate) == "" { |
| 228 | return "", false |
| 229 | } |
| 230 | |
| 231 | if strings.Contains(candidate, string(os.PathSeparator)) { |
| 232 | if _, err := os.Stat(candidate); err == nil { |
| 233 | return candidate, true |
| 234 | } |
| 235 | return "", false |
| 236 | } |
| 237 | |
| 238 | resolved, err := exec.LookPath(candidate) |
| 239 | if err != nil { |
| 240 | return "", false |
| 241 | } |
| 242 | return resolved, true |
| 243 | } |
no outgoing calls
no test coverage detected