Refactor error handling

This commit is contained in:
2025-06-12 11:33:13 +10:00
parent 2a042968d0
commit b80afd97f1
16 changed files with 304 additions and 122 deletions

View File

@ -1,7 +1,6 @@
package common
import (
"errors"
"io"
"os"
)
@ -23,5 +22,5 @@ func LoadTemplate(templatePath string) ([]byte, error) {
}
return result, nil
}
return nil, errors.New("模板文件不存在")
return nil, NewFileNotFoundError(templatePath)
}