aboutsummaryrefslogtreecommitdiff
path: root/package_git.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2018-05-21 03:52:13 +0700
committerShulhan <ms@kilabit.info>2018-05-21 03:52:13 +0700
commit07793357af399c3f6722be3d1f5efb7af4e432b4 (patch)
tree55771f734c63292be20a9f18e2fdd3933e1d58dc /package_git.go
parent8f01bf679c2bec9b514f4ea2d0f3d5c4eca9e953 (diff)
downloadbeku-07793357af399c3f6722be3d1f5efb7af4e432b4.tar.xz
Use filepath.Join when applicable
Diffstat (limited to 'package_git.go')
-rw-r--r--package_git.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/package_git.go b/package_git.go
index ee46d39..8f43b47 100644
--- a/package_git.go
+++ b/package_git.go
@@ -6,6 +6,7 @@ import (
"log"
"os"
"os/exec"
+ "path/filepath"
"github.com/shuLhan/share/lib/ini"
)
@@ -105,7 +106,7 @@ func (pkg *Package) gitFetch() (err error) {
if pkg.isTag {
pkg.VersionNext, err = pkg.gitGetTagLatest()
} else {
- ref := pkg.RemoteName + "/" + gitDefBranch
+ ref := filepath.Join(pkg.RemoteName, gitDefBranch)
pkg.VersionNext, err = pkg.gitGetCommit(ref)
}
@@ -267,7 +268,7 @@ func (pkg *Package) gitScan() (err error) {
}
func (pkg *Package) gitScanRemote() (err error) {
- gitConfig := pkg.FullPath + "/" + gitDir + "/config"
+ gitConfig := filepath.Join(pkg.FullPath, gitDir, "config")
gitIni, err := ini.Open(gitConfig)
if err != nil {