blob: 0c9ba4f9507e9ee344bfd57dfbe2dec8dfd2ddda [file] [log] [blame]
Lukacs T. Berki7690c092021-02-26 14:27:36 +01001package shared
2
3import (
4 "os"
5 "os/exec"
6)
7
8// Finds the Delve binary to use. Either uses the SOONG_DELVE_PATH environment
9// variable or if that is unset, looks at $PATH.
10func ResolveDelveBinary() string {
11 result := os.Getenv("SOONG_DELVE_PATH")
12 if result == "" {
13 result, _ = exec.LookPath("dlv")
14 }
15
16 return result
17}