-
Notifications
You must be signed in to change notification settings - Fork 0
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
FileQuestion / ImageConstraintの実装改築 #86
Conversation
42b5a9e
to
d849a8b
Compare
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
9502665
to
2dbe3f6
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #86 +/- ##
==========================================
+ Coverage 24.47% 25.30% +0.82%
==========================================
Files 114 114
Lines 3362 3505 +143
==========================================
+ Hits 823 887 +64
- Misses 2539 2618 +79 ☔ View full report in Codecov by Sentry. |
} | ||
|
||
func (c ImageFileConstraint) GetFileType() FileType { | ||
return Image | ||
} | ||
|
||
func (c ImageFileConstraint) GetExtensions() []Extension { | ||
return c.Extensions | ||
return []Extension{".jpg", ".jpeg", ".png", ".webp"} | ||
} | ||
|
||
func (c ImageFileConstraint) ValidateFiles(files []File) error { |
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.
この関数は画像ファイルのみに対して実行するもの?? であると、実際に使用する際にファイルから画像のみを取り出す必要が出てきて面倒そう..
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.
LGTM
抽象化のおかげで差分いい感じに収まった感あります!すごすんに
PRで実装される機能
PRで修正される機能
map[FileType]FileConstraint
の廃止レビューをお願いしたいポイント