Task Attachments #104

Merged
konrad merged 63 commits from feature/attachments into master 2019-10-16 20:52:31 +00:00
1 changed files with 3 additions and 0 deletions
Showing only changes of commit 8619502d39 - Show all commits

View File

@ -19,14 +19,17 @@ package files
import "fmt"
// ErrFileDoesNotExist defines an error where a file does not exist in the db
type ErrFileDoesNotExist struct {
FileID int64
}
// Error is the error implementaion of ErrFileDoesNotExist
func (err ErrFileDoesNotExist) Error() string {
return fmt.Sprintf("file %d does not exist", err.FileID)
}
//IsErrFileDoesNotExist checks if an error is ErrFileDoesNotExist
func IsErrFileDoesNotExist(err error) bool {
_, ok := err.(ErrFileDoesNotExist)
return ok