From 167b0f46ef946fad3ca13976c3b87598f505e2ea Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 15 Mar 2021 02:52:12 +0800 Subject: chore(models): rewrite code format. (#14754) * chore: rewrite format. * chore: update format Signed-off-by: Bo-Yi Wu * chore: update format Signed-off-by: Bo-Yi Wu * chore: Adjacent parameters with the same type should be grouped together * chore: update format. --- models/issue_stopwatch.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'models/issue_stopwatch.go') diff --git a/models/issue_stopwatch.go b/models/issue_stopwatch.go index 19bd4ab2c5..b72dcaf60c 100644 --- a/models/issue_stopwatch.go +++ b/models/issue_stopwatch.go @@ -54,7 +54,7 @@ func GetUserStopwatches(userID int64, listOptions ListOptions) ([]*Stopwatch, er } // StopwatchExists returns true if the stopwatch exists -func StopwatchExists(userID int64, issueID int64) bool { +func StopwatchExists(userID, issueID int64) bool { _, exists, _ := getStopwatch(x, userID, issueID) return exists } @@ -108,7 +108,7 @@ func CreateOrStopIssueStopwatch(user *User, issue *Issue) error { return err } } else { - //if another stopwatch is running: stop it + // if another stopwatch is running: stop it exists, sw, err := HasUserStopwatch(user.ID) if err != nil { return err -- cgit v1.2.3