Skip to content

TipsyPixie/howtodo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HowToDo

HowoToDo is Go port of howdoi

Abstract

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!

Requirements

  • Go ~1.11.0
  • Recommended OS as Windows 10 or Ubuntu 18.04

Getting Started

  1. Install Go compiler at https://golang.org/dl/
  2. Check out the installation is completed
    $ go version
    go1.11.1 linux/amd64
  3. Make a directory for Go projects
    $ mkdir -p $HOME/go
  4. Set up GOPATH to your Go project directory
    $ export GOPATH="$HOME/go"
  5. Get the source code
    $ go get github.com/TipsyPixie/howtodo
  6. Compile the code
    $ go install github.com/TipsyPixie/howtodo
  7. Ask em' anything!
    $ $GOPATH/bin/howtodo go handle exception
    https://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)
    }
    ...

Usage

$ howtodo -h
Usage of howtodo:
  -a    Show full content of answer
  -l    Show only link to answer
  -v    Show version

About

Instant Stackoverflow via command line

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages