summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-08 14:31:49 -0500
committerUnknwon <u@gogs.io>2015-11-08 14:31:49 -0500
commitb55499d039c5e35130057b8af16401c558e79e79 (patch)
tree4f3fc503ac7f1bb4f63733f359ba450fd90f3f1b /models
parent58436b5ea51cb5e09fb244331d7a9acf70258063 (diff)
downloadgitea-b55499d039c5e35130057b8af16401c558e79e79.tar.gz
gitea-b55499d039c5e35130057b8af16401c558e79e79.zip
go vet and fix #1890
Diffstat (limited to 'models')
-rw-r--r--models/action.go4
-rw-r--r--models/migrations/migrations.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/models/action.go b/models/action.go
index cfa6e14d93..e94bb9441b 100644
--- a/models/action.go
+++ b/models/action.go
@@ -147,7 +147,7 @@ func newRepoAction(e Engine, u *User, repo *Repository) (err error) {
RepoName: repo.Name,
IsPrivate: repo.IsPrivate,
}); err != nil {
- return fmt.Errorf("notify watchers '%d/%s': %v", u.Id, repo.ID, err)
+ return fmt.Errorf("notify watchers '%d/%d': %v", u.Id, repo.ID, err)
}
log.Trace("action.newRepoAction: %s/%s", u.Name, repo.Name)
@@ -488,7 +488,7 @@ func transferRepoAction(e Engine, actUser, oldOwner, newOwner *User, repo *Repos
IsPrivate: repo.IsPrivate,
Content: path.Join(oldOwner.LowerName, repo.LowerName),
}); err != nil {
- return fmt.Errorf("notify watchers '%d/%s': %v", actUser.Id, repo.ID, err)
+ return fmt.Errorf("notify watchers '%d/%d': %v", actUser.Id, repo.ID, err)
}
// Remove watch for organization.
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go
index d7549d07fa..0d17cf2691 100644
--- a/models/migrations/migrations.go
+++ b/models/migrations/migrations.go
@@ -456,7 +456,7 @@ func trimCommitActionAppUrlPrefix(x *xorm.Engine) error {
pushCommits = new(PushCommits)
if err = json.Unmarshal(action["content"], pushCommits); err != nil {
- return fmt.Errorf("unmarshal action content[%s]: %v", actID, err)
+ return fmt.Errorf("unmarshal action content[%d]: %v", actID, err)
}
infos := strings.Split(pushCommits.CompareUrl, "/")
@@ -467,7 +467,7 @@ func trimCommitActionAppUrlPrefix(x *xorm.Engine) error {
p, err := json.Marshal(pushCommits)
if err != nil {
- return fmt.Errorf("marshal action content[%s]: %v", actID, err)
+ return fmt.Errorf("marshal action content[%d]: %v", actID, err)
}
if _, err = sess.Id(actID).Update(&Action{