Skip to content

Commit

Permalink
Fix typos related to ErrTaskDoesNotExist error (go-gitea#20118)
Browse files Browse the repository at this point in the history
Fixes: f2a3abc ("Move migrating repository from frontend to backend (go-gitea#6200)")
  • Loading branch information
arkamar authored and Sysoev, Vladimir committed Aug 10, 2022
1 parent 7fa3cd0 commit c2ff9b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,14 @@ type ErrTaskDoesNotExist struct {
Type structs.TaskType
}

// IsErrTaskDoesNotExist checks if an error is a ErrTaskIsNotExist.
// IsErrTaskDoesNotExist checks if an error is a ErrTaskDoesNotExist.
func IsErrTaskDoesNotExist(err error) bool {
_, ok := err.(ErrTaskDoesNotExist)
return ok
}

func (err ErrTaskDoesNotExist) Error() string {
return fmt.Sprintf("task is not exist [id: %d, repo_id: %d, type: %d]",
return fmt.Sprintf("task does not exist [id: %d, repo_id: %d, type: %d]",
err.ID, err.RepoID, err.Type)
}

Expand Down

0 comments on commit c2ff9b2

Please sign in to comment.