aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2018-09-15 00:36:44 +0700
committerShulhan <ms@kilabit.info>2018-09-15 00:36:44 +0700
commite74b4be7c675849e04d6929a2017cb08e63afd69 (patch)
treea1efba67a33e5d1760970c912c755431a0bd73cd
parentf538240dc38b7eb477ba15d99b46f8d1a40c0bca (diff)
downloadbeku-e74b4be7c675849e04d6929a2017cb08e63afd69.tar.xz
package: rename Fetch to FetchLatestVersion
-rw-r--r--env.go4
-rw-r--r--package.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/env.go b/env.go
index c385d63..6efe1fc 100644
--- a/env.go
+++ b/env.go
@@ -1049,7 +1049,7 @@ func (env *Env) install(pkg *Package) (ok bool, err error) {
}
func (env *Env) update(curPkg, newPkg *Package) (ok bool, err error) {
- err = curPkg.Fetch()
+ err = curPkg.FetchLatestVersion()
if err != nil {
return
}
@@ -1271,7 +1271,7 @@ func (env *Env) SyncAll() (err error) {
fmt.Printf("[ENV] SyncAll %s >>> Current version is %s\n",
pkg.ImportPath, pkg.Version)
- err = pkg.Fetch()
+ err = pkg.FetchLatestVersion()
if err != nil {
return
}
diff --git a/package.go b/package.go
index bd6f2d5..54f019a 100644
--- a/package.go
+++ b/package.go
@@ -112,10 +112,10 @@ func (pkg *Package) CompareVersion(newPkg *Package) (err error) {
}
//
-// Fetch will try to update the package and get the latest version (tag or
+// FetchLatestVersion will try to update the package and get the latest version (tag or
// commit).
//
-func (pkg *Package) Fetch() (err error) {
+func (pkg *Package) FetchLatestVersion() (err error) {
switch pkg.vcsMode {
case VCSModeGit:
err = git.FetchAll(pkg.FullPath)