Skip to content

Commit

Permalink
Add a description to gist
Browse files Browse the repository at this point in the history
Fixes #2
  • Loading branch information
178inaba committed May 29, 2017
1 parent c5ec244 commit 8408245
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import (

const defaultTokenFilePath = ".config/gistup/token"

var isAnonymous = flag.Bool("a", false, "Create anonymous gist")
var (
isAnonymous = flag.Bool("a", false, "Create anonymous gist")
description = flag.String("d", "", "Description of gist")
)

func main() {
flag.Parse()
Expand Down Expand Up @@ -76,8 +79,9 @@ func run() int {
}

g, _, err := c.Gists.Create(ctx, &github.Gist{
Files: files,
Public: github.Bool(false),
Description: description,
Files: files,
Public: github.Bool(false),
})
if err != nil {
log.Fatal(err)
Expand Down

0 comments on commit 8408245

Please sign in to comment.