Skip to content

Instantly share code, notes, and snippets.

@picatz
Created January 21, 2018 19:39
Show Gist options
  • Save picatz/1f6e75b9bd31c0e5586c65d6ed24e605 to your computer and use it in GitHub Desktop.
Save picatz/1f6e75b9bd31c0e5586c65d6ed24e605 to your computer and use it in GitHub Desktop.
func main() {
if len(os.Args) > 1 {
found := FindInPath(os.Args[1:])
for path := range found {
fmt.Println(path)
}
} else {
fmt.Println("usage: which program ...")
os.Exit(1)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment