aboutsummaryrefslogtreecommitdiffstats
path: root/cache/repo_cache.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-11 22:04:16 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-11 22:14:46 +0200
commit3605887345792d2f981f971c6c4a2cb7f86a343e (patch)
treeafd525b6e3a638e4c619a5a986fcb2811c297444 /cache/repo_cache.go
parent7b05983c19af4da70f2a9a5062913f4e4f5d5faa (diff)
downloadgit-bug-3605887345792d2f981f971c6c4a2cb7f86a343e.tar.gz
reorganize package for a more idomatic go
Diffstat (limited to 'cache/repo_cache.go')
-rw-r--r--cache/repo_cache.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/cache/repo_cache.go b/cache/repo_cache.go
index cd743e92..d8b14501 100644
--- a/cache/repo_cache.go
+++ b/cache/repo_cache.go
@@ -13,9 +13,10 @@ import (
"strings"
"github.com/MichaelMure/git-bug/bug"
- "github.com/MichaelMure/git-bug/bug/operations"
+ "github.com/MichaelMure/git-bug/operations"
"github.com/MichaelMure/git-bug/repository"
- "github.com/MichaelMure/git-bug/util"
+ "github.com/MichaelMure/git-bug/util/git"
+ "github.com/MichaelMure/git-bug/util/process"
)
type RepoCache struct {
@@ -262,7 +263,7 @@ func (c *RepoCache) NewBug(title string, message string) (*BugCache, error) {
// NewBugWithFiles create a new bug with attached files for the message
// The new bug is written in the repository (commit)
-func (c *RepoCache) NewBugWithFiles(title string, message string, files []util.Hash) (*BugCache, error) {
+func (c *RepoCache) NewBugWithFiles(title string, message string, files []git.Hash) (*BugCache, error) {
author, err := bug.GetUser(c.repo)
if err != nil {
return nil, err
@@ -382,7 +383,7 @@ func repoIsAvailable(repo repository.Repo) error {
return err
}
- if util.ProcessIsRunning(pid) {
+ if process.IsRunning(pid) {
return fmt.Errorf("the repository you want to access is already locked by the process pid %d", pid)
}