Skip to content

Commit

Permalink
set usage sample and available commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ariestiyansyah committed Sep 16, 2017
1 parent cf37de6 commit 6f0257f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
12 changes: 0 additions & 12 deletions Makefile

This file was deleted.

13 changes: 12 additions & 1 deletion gitnore.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ func main() {

func usage() {
fmt.Println("Usage: ./gitnore -i language -o .gitignore")
flag.PrintDefaults()
fmt.Println()
fmt.Println("Available commands:")
fmt.Println("\tupdate \t: Update gitignore dictionary")
fmt.Println("\tlist \t: List available gitignore")
fmt.Println()
fmt.Println("Parameters:")
fmt.Println("\t-i \t: Select Language (-i python)")
fmt.Println("\t-o \t: Output filename (default .gitignore)")
fmt.Println()
fmt.Println("Example usage:")
fmt.Println("\t$ gitnore -i python \t\t: default set to .gitignore")
fmt.Println("\t$ gitnore -i go -u .gitmodule \t: set output file to .gitmodule")
os.Exit(1)
}

0 comments on commit 6f0257f

Please sign in to comment.