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

Kadai2 yasu #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Kadai2 yasu #34

wants to merge 4 commits into from

Conversation

yasuno0327
Copy link

gopher道場第二回課題

io.Reader, Writerについて

kadai2/yasu/READWRITER.mdこちらに記載しました。

テスト

converterパッケージに対してそれぞれの関数が実行できるかのテストを書きました。

@yasuno0327 yasuno0327 added the kadai2 課題2 label Nov 19, 2018
@yasuno0327 yasuno0327 self-assigned this Nov 19, 2018
}
switch afterFormat {
case "png":
out, err := os.Create(file.Name() + ".png")
Copy link

Choose a reason for hiding this comment

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

これだと foo.jpg というファイルの入力の場合に foo.jpg.png というファイル名になりませんか?
それは意図したものでしょうか?

return err
}
for _, fileInfo := range files {
file, err := os.Open(directory + "/" + fileInfo.Name()) // Read file
Copy link

Choose a reason for hiding this comment

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

できればfilepath.Join使ってほしいです。
あと対象のディレクトリのなかに更にディレクトリがあった場合、それも変換しようとしますが大丈夫でしょうか?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kadai2 課題2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants