A which
or command -v
like tool for Go.
Open a terminal and run the following:
$ go get -u github.com/mjwhitta/where
$ go install github.com/mjwhitta/where/cmd/where@latest
Or compile from source:
$ git clone https://github.com/mjwhitta/where.git
$ cd where
$ git submodule update --init
$ make
package main
import (
"fmt"
"github.com/mjwhitta/where"
)
func main() {
fmt.Println(where.Is("bash"))
}