aboutsummaryrefslogtreecommitdiff
path: root/lib/git/git.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2019-06-14 15:56:51 +0700
committerShulhan <ms@kilabit.info>2019-06-14 15:56:51 +0700
commitadc700912f9da26c517c8130558d6eb972a51079 (patch)
treec03696c3b398319cf837d67d8fcc5d7844e05420 /lib/git/git.go
parent374bfc155857877f9638ccae37baacef01dc4b6a (diff)
downloadpakakeh.go-adc700912f9da26c517c8130558d6eb972a51079.tar.xz
all: fix nolint format
The valid syntax to suppress linter warnings is "//nolint:<name>" with no space between comment and "nolint" and between ":". Also, we move the placement of nolint directive to the top of statements for multiple nolint in the same scope. While at it, fix and supress some linter warnings.
Diffstat (limited to 'lib/git/git.go')
-rw-r--r--lib/git/git.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/git/git.go b/lib/git/git.go
index 1fcf2c97..7dd86d15 100644
--- a/lib/git/git.go
+++ b/lib/git/git.go
@@ -22,9 +22,10 @@ const (
_defBranch = "master"
)
+//nolint:gochecknoglobals
var (
- _stdout = os.Stdout //nolint: gochecknoglobals
- _stderr = os.Stderr //nolint: gochecknoglobals
+ _stdout = os.Stdout
+ _stderr = os.Stderr
)
//
@@ -204,7 +205,7 @@ func GetRemoteURL(repoDir, remoteName string) (url string, err error) {
return
}
- url, ok := gitIni.Get("remote", remoteName, "url")
+ url, ok := gitIni.Get("remote", remoteName, "url", "")
if !ok {
err = fmt.Errorf("GetRemote: Empty or invalid remote name")
}