Skip to content

Commit

Permalink
lint: gofmt and golint
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed May 19, 2021
1 parent 4c46696 commit 743fde3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cmd/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package cmd
import (
"bytes"
"embed"
"text/template"
"runtime"
"text/template"

"github.com/spf13/afero"
)
Expand All @@ -15,7 +15,7 @@ var templatesFS embed.FS
type hookTmplData struct {
AutoInstall string
HookName string
Extension string
Extension string
}

func hookTemplate(hookName string, fs afero.Fs) []byte {
Expand All @@ -24,7 +24,7 @@ func hookTemplate(hookName string, fs afero.Fs) []byte {
err := t.Execute(buf, hookTmplData{
AutoInstall: autoInstall(hookName, fs),
HookName: hookName,
Extension: getExtension(),
Extension: getExtension(),
})
check(err)

Expand All @@ -47,9 +47,8 @@ func autoInstall(hookName string, fs afero.Fs) string {
}

func getExtension() string {
if (runtime.GOOS == "windows") {
if runtime.GOOS == "windows" {
return ".exe"
} else {
return ""
}
return ""
}

0 comments on commit 743fde3

Please sign in to comment.