aboutsummaryrefslogtreecommitdiff
path: root/models/repo.go
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@sapk.fr>2016-01-28 20:49:05 +0100
committerAntoine GIRARD <sapk@sapk.fr>2016-01-28 20:51:19 +0100
commitb7b30cd85e5cabd9d643013ffb10dafd133b18ea (patch)
tree64c950a4add6d9482d3dd4daebaea5e1839eb866 /models/repo.go
parent81e5722bcc80e560f4e50874a9319f5c5fd3c0f3 (diff)
Corrections following recommendations
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/repo.go b/models/repo.go
index 82fea00a..a0074a29 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -288,9 +288,9 @@ func (repo *Repository) GetMirror() (err error) {
return err
}
-func (repo *Repository) GetBranch(br string) (_ *Branch, err error) {
+func (repo *Repository) GetBranch(br string) (*Branch, error) {
if(!git.IsBranchExist(repo.RepoPath(), br)){
- return nil, errors.New("Branch do not exist");
+ return nil, fmt.Errorf("Branch does not exist: %s", br);
}
return &Branch{
Path: repo.RepoPath(),
@@ -298,7 +298,7 @@ func (repo *Repository) GetBranch(br string) (_ *Branch, err error) {
},nil
}
-func (repo *Repository) GetBranches() (_ []*Branch, err error) {
+func (repo *Repository) GetBranches() ([]*Branch, error) {
return GetBranchesByPath(repo.RepoPath())
}