Skip to content

Kadai2 yasu - #34

Open
yasuno0327 wants to merge 4 commits into
masterfrom
kadai2-yasu
Open

Kadai2 yasu#34
yasuno0327 wants to merge 4 commits into
masterfrom
kadai2-yasu

Conversation

@yasuno0327

Copy link
Copy Markdown

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
Copy Markdown

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 というファイル名になりませんか?
それは意図したものでしょうか?

Comment thread kadai2/yasu/main.go
return err
}
for _, fileInfo := range files {
file, err := os.Open(directory + "/" + fileInfo.Name()) // Read file

Copy link
Copy Markdown

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