Skip to content

Instantly share code, notes, and snippets.

@iand
Last active December 7, 2017 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iand/6ad893e69b54cfd926b084d4ec9e653f to your computer and use it in GitHub Desktop.
Save iand/6ad893e69b54cfd926b084d4ec9e653f to your computer and use it in GitHub Desktop.
How I start writing every command line tool in Go
package main
import (
"flag"
"fmt"
"os"
)
func main() {
flag.Parse()
if err := Main(); err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}
func Main() error {
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment