Fix typos related to ErrTaskDoesNotExist error (#20118)

Fixes: f2a3abc683 ("Move migrating repository from frontend to backend (#6200)")
pull/20088/head^2
Petr Vaněk 2 years ago committed by GitHub
parent 48ef12b27c
commit d789d3646c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      models/task.go

@ -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)
}

Loading…
Cancel
Save