-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ErrInvalidArgument in packages #22268
Conversation
Codecov Report
@@ Coverage Diff @@
## main #22268 +/- ##
=======================================
Coverage ? 48.14%
=======================================
Files ? 1043
Lines ? 142380
Branches ? 0
=======================================
Hits ? 68550
Misses ? 65645
Partials ? 8185
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a feeling we need to make a NewInvalidError function in util,
// NewInvalidError returns an error that formats as the given text but unwraps as an InvalidError
func NewInvalidError(message string) error {
return SilentWrap{Message: message, Err: util.ErrInvalidArgument}
}
As an aside lots of the comments on the errors have gone missing in this PR.
See KN4CK3R#4 |
Not missing, I intentionaly removed them on purpose. The comments were required at the time of writing and I see no benefit in comments like // ErrMissingComposerFile indicates a missing composer.json file
ErrMissingComposerFile = errors.New("composer.json file is missing") |
* Add convenience functions and do some more refactoring Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
🚀 |
* upstream/main: Add deprecated warning for DISABLE_GRAVATAR and ENABLE_FEDERATED_AVATAR (go-gitea#22318) Unify hashing for avatar (go-gitea#22289) fix: code search title translation (go-gitea#22285) Update Gmail mailer configuration (go-gitea#22291) Fix due date rendering the wrong date in issue (go-gitea#22302) Fix get system setting bug when enabled redis cache (go-gitea#22295) Restructure `webhook` module (go-gitea#22256) Reminder for no more logs to console (go-gitea#22282) Fix bug of DisableGravatar default value (go-gitea#22296) Upgrade go-chi to v5.0.8 (go-gitea#22304) [skip ci] Updated licenses and gitignores Use ErrInvalidArgument in packages (go-gitea#22268) Changelog v1.18.0 (go-gitea#22215) (go-gitea#22269) Support estimated count with multiple schemas (go-gitea#22276) Add Gentoo to the from package providers (go-gitea#22284) Fix sitemap (go-gitea#22272) Add `sync_on_commit` option for push mirrors api (go-gitea#22271) Fix key signature error page (go-gitea#22229)
Related to #22262 (comment)