howtodo

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2018 License: MIT Imports: 7 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL