Last active
December 7, 2017 17:14
-
-
Save iand/6ad893e69b54cfd926b084d4ec9e653f to your computer and use it in GitHub Desktop.
How I start writing every command line tool in Go
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
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