HowoToDo is Go port of howdoi
Can you come up with a flawless tar command in a second? How about curl with some gibberish headers? Do you know how to write a complete ps, rsync, ssh, and sftp with all the command line flags you need? Well, now you know HowToDo, the instant stackoverflow via command line!
You don't open up a browser, type www.stackoverflow.com, and search tar flags.
Instead, simply run howtodo tar flags on your command line and there you go!
- Go ~1.11.0
- Recommended OS as Windows 10 or Ubuntu 18.04
- Install Go compiler at https://golang.org/dl/
- Check out the installation is completed
$ go version
go1.11.1 linux/amd64
- Make a directory for Go projects
$ mkdir -p $HOME/go - Set up GOPATH to your Go project directory
$ export GOPATH="$HOME/go"
- Get the source code
$ go get github.com/TipsyPixie/howtodo
- Compile the code
$ go install github.com/TipsyPixie/howtodo
- Ask em' anything!
$ $GOPATH/bin/howtodo go handle exceptionhttps://stackoverflow.com/questions/25025467/catching-panics-in-golang func main() { if len(os.Args) != 2 { fmt.Printf("usage: %s [filename]\n", os.Args[0]) os.Exit(1) } file, err := os.Open(os.Args[1]) if err != nil { log.Fatal(err) } fmt.Printf("%s", file) } ...
$ howtodo -hUsage of howtodo:
-a Show full content of answer
-l Show only link to answer
-v Show version