Skip to content

Commit

Permalink
Add usage
Browse files Browse the repository at this point in the history
Fixes #6
  • Loading branch information
178inaba committed May 27, 2017
1 parent a2a6225 commit c5ec244
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ func main() {
}

func run() int {
args := flag.Args()
if len(args) == 0 {
flag.Usage()
return 1
}

var c *github.Client
ctx := context.Background()
if !*isAnonymous {
Expand All @@ -46,7 +52,7 @@ func run() int {
}

files := map[github.GistFilename]github.GistFile{}
for _, fileName := range flag.Args() {
for _, fileName := range args {
var fp string
if filepath.IsAbs(fileName) {
fp = fileName
Expand Down

0 comments on commit c5ec244

Please sign in to comment.