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 miyahara #31

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

Kadai2 miyahara #31

wants to merge 3 commits into from

Conversation

hikaru7719
Copy link

課題2のPRです。(まだ途中)
よろしくおねがいします。

io.Readerとio.Writer

  • io.Readerとio.Writerについて調べてみよう ( Reader_and_Writer.md )
    • 標準パッケージでどのように使われているか
    • io.Readerとio.Writerがあることでどういう利点があるのか具体例を挙げて考えてみる

テストを書いてみよう

1回目の宿題のテストを作ってみて下さい

  • テストのしやすさを考えてリファクタリングしてみる
  • テストのカバレッジを取ってみる
  • テーブル駆動テストを行う
  • テストヘルパーを作ってみる

@tenntenn tenntenn added the kadai2 課題2 label Nov 19, 2018
}

outputFile, err := os.Create(fileset.outputFileName)
defer outputFile.Close()
Copy link

Choose a reason for hiding this comment

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

https://play.golang.org/p/S9YecKjLVo8
例えば、すでにあるディレクトリに対して os.Create を実行します。
当然エラーが返ってきますが、そのとき outputFile の中身はどうなっていますか?
その場合に outputFile.Close() を呼ぶとどうなるか試してみてください。


// outputFilePath returns output file path to correspond input file path.
func (c Converter) outputFilePath(inputFileName string) string {
stringSlice := strings.Split(inputFileName, ".")
Copy link

Choose a reason for hiding this comment

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

Mac だと /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/slack-menubar-highlight.png というパスに画像ファイルがあるんですが、正しく変換されますか?

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.

3 participants