-
Notifications
You must be signed in to change notification settings - Fork 7
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-dshirae #16
base: master
Are you sure you want to change the base?
Kadai2-dshirae #16
Conversation
flag.Parse() | ||
|
||
if (flag.NArg() == 0) && (flag.NFlag() == 0) { | ||
fmt.Println("Usage: chimgs DIR [-i=imgext] [-o=imgext]") |
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.
標準エラー出力にだす
} | ||
dirname := flag.Arg(0) | ||
|
||
filepath.Walk(dirname, |
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.
エラー処理
if err != nil { | ||
return err | ||
} | ||
defer savefile.Close() |
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.
エラー処理
"os" | ||
"path/filepath" | ||
|
||
"./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.
相対パスにしない
課題2
テストを書いてみよう
1回目の宿題のテストを作ってみてください
課題1に実装しなかった、
ユーザ定義型を作ってみる
を実装した課題提出時コードにて80% のカバレッジ
$ go test -coverprofile=cover.out -run ''
$ go tool cover -html=cover.out
実装しました
実装したが、うまく使えてない気がする。(再調査)
io.Readerとio.Writer
io.Readerとio.Writerについて調べてみよう
[WIP]
抽象化された事でOS間の違いが吸収される。標準出力(console)など