Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Cory Bennett committed Sep 12, 2015
1 parent 85f617c commit 99f62a9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions jira/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (c *Cli) getTemplate(name string) string {
} else {
return readFile(file)
}
}
}
return all_templates[name]
} else {
return readFile(file)
Expand Down Expand Up @@ -249,8 +249,8 @@ func (c *Cli) editTemplate(template string, tmpFilePrefix string, templateData m
editing = false
}

tmpFileNameOrig := fmt.Sprintf("%s.orig",tmpFileName)
copyFile(tmpFileName,tmpFileNameOrig)
tmpFileNameOrig := fmt.Sprintf("%s.orig", tmpFileName)
copyFile(tmpFileName, tmpFileNameOrig)
defer func() {
os.Remove(tmpFileNameOrig)
}()
Expand Down
2 changes: 1 addition & 1 deletion jira/cli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (c *Cli) CmdList() error {
}

if sort, ok := c.opts["sort"]; ok && sort != "" {
qbuff.WriteString(fmt.Sprintf(" ORDER BY %s", sort ))
qbuff.WriteString(fmt.Sprintf(" ORDER BY %s", sort))
}

query = qbuff.String()
Expand Down
5 changes: 2 additions & 3 deletions jira/cli/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ func readFile(file string) string {
return string(bytes)
}

func copyFile(src, dst string) (err error){
var s, d *os.File;
func copyFile(src, dst string) (err error) {
var s, d *os.File
if s, err = os.Open(src); err == nil {
defer s.Close()
if d, err = os.Create(dst); err == nil {
Expand All @@ -78,7 +78,6 @@ func copyFile(src, dst string) (err error){
return
}


func fuzzyAge(start string) (string, error) {
if t, err := time.Parse("2006-01-02T15:04:05.000-0700", start); err != nil {
return "", err
Expand Down

0 comments on commit 99f62a9

Please sign in to comment.