Created
January 21, 2018 19:39
-
-
Save picatz/1f6e75b9bd31c0e5586c65d6ed24e605 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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