Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

InoAyaka / 課題1 #4

wants to merge 1 commit into from

Conversation

InoAyaka
Copy link

@InoAyaka InoAyaka commented Jul 6, 2020

課題1のPRになります。
レビューいただけると幸いです。
詳細は、README.mdをご確認ください。

@InoAyaka InoAyaka marked this pull request as ready for review July 6, 2020 14:28

//addFileName どのファイルでエラーになったか分かるようにerrにファイル名を付加して返します。
func addFileName(err error, f string) error {
err = fmt.Errorf("%v\nerrFile : %s", err, f)
Copy link
Member

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()
Copy link
Member

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 //変換前 画像形式
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

フィールド名は略さない

@tenntenn tenntenn added kadai1 課題1 reviewed レビュー済 labels Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kadai1 課題1 reviewed レビュー済
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants