-
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
InoAyaka / 課題1 #4
base: master
Are you sure you want to change the base?
Conversation
|
||
//addFileName どのファイルでエラーになったか分かるようにerrにファイル名を付加して返します。 | ||
func addFileName(err error, f string) error { | ||
err = fmt.Errorf("%v\nerrFile : %s", err, f) |
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.
関数にせず、fmt.Errorf("%w: %s", out.Name())
のようにラップした方がよいです。
https://golang.org/pkg/fmt/#Errorf
ログとかのことを考えるとエラーメッセージは改行入れないほうがいいです。
os.Exit(1) | ||
} | ||
|
||
convert() |
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.
エラー処理はしなくてよい?
//Args ImageConverter()を使う際に指定が必要となる引数 | ||
type Args struct { | ||
FilePath string //変換対象となるファイル名 | ||
Bf string //変換前 画像形式 |
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.
フィールド名は略さない
課題1のPRになります。
レビューいただけると幸いです。
詳細は、README.mdをご確認ください。