diff options
| author | Shulhan <ms@kilabit.info> | 2018-05-21 03:52:13 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2018-05-21 03:52:13 +0700 |
| commit | 07793357af399c3f6722be3d1f5efb7af4e432b4 (patch) | |
| tree | 55771f734c63292be20a9f18e2fdd3933e1d58dc /package_git.go | |
| parent | 8f01bf679c2bec9b514f4ea2d0f3d5c4eca9e953 (diff) | |
| download | beku-07793357af399c3f6722be3d1f5efb7af4e432b4.tar.xz | |
Use filepath.Join when applicable
Diffstat (limited to 'package_git.go')
| -rw-r--r-- | package_git.go | 5 |
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 { |
