{"id":37144042,"url":"https://github.com/nukopy/learn-io-from-golang","last_synced_at":"2026-01-14T16:54:53.883Z","repository":{"id":184570628,"uuid":"672028127","full_name":"nukopy/learn-io-from-golang","owner":"nukopy","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-31T17:09:50.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-12T22:42:40.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nukopy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-28T18:17:13.000Z","updated_at":"2023-07-29T02:44:27.000Z","dependencies_parsed_at":"2023-08-18T11:32:19.723Z","dependency_job_id":null,"html_url":"https://github.com/nukopy/learn-io-from-golang","commit_stats":null,"previous_names":["nukopy/learn-io-from-golang"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nukopy/learn-io-from-golang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukopy%2Flearn-io-from-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukopy%2Flearn-io-from-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukopy%2Flearn-io-from-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukopy%2Flearn-io-from-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nukopy","download_url":"https://codeload.github.com/nukopy/learn-io-from-golang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukopy%2Flearn-io-from-golang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28427072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T16:54:53.372Z","updated_at":"2026-01-14T16:54:53.870Z","avatar_url":"https://github.com/nukopy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# learn-io-from-golang\n\nZenn の本「[Go から学ぶ I/O](https://zenn.dev/hsaki/books/golang-io-package)」の写経リポジトリ\n\n## 開発環境\n\n- macOS 14.0 Sonoma\n- Go 1.20.6\n\n## 書籍の概要\n\n引用元：[Go から学ぶ I/O：Chapter 01 - はじめに](https://zenn.dev/hsaki/books/golang-io-package/viewer/intro)\n\n\u003e この本では、Go 言語で扱える I/O についてまとめています。\n\u003e\n\u003e Go 言語 I/O を扱うためのパッケージとしては、ドンピシャのものとしては io パッケージがあります。\n\u003e しかし、例えば実際にファイルを読み書きしようとするときに使うのは、os パッケージの os.File 型まわりのメソッドです。\n\u003e 標準入力・出力を扱おうとすると fmt パッケージが手っ取り早いですし、また速さを求める場面では bufio パッケージのスキャナを使うということもあるでしょう。\n\u003e このように、「I/O」といっても Go でそれに関わるパッケージは幅広いのが現状です。\n\u003e\n\u003e また、ファイルオブジェクト f に対して `f.Read()` とかいう「おまじない」と唱えるだけで、なんでファイルの中身が取得できるの？一体裏で何が起こっているの？という疑問を感じている方もいるかと思います。\n\u003e\n\u003e ここでは\n\u003e\n\u003e - os や io とかいっぱいあるけど、それぞれどういう関係なの？\n\u003e - 標準入力・出力を扱うときに fmt と bufio はどっちがいいの？\n\u003e - そもそも bufio パッケージって何者？\n\u003e - Go でやった I/O まわりの操作は、実現のために裏で何が起こっているの？\n\u003e\n\u003e こういったことを一から解説していきます。\n\n## 目次\n\n- [x] Chapter 01：はじめに\n- [x] Chapter 02：ファイルの読み書き\n- [x] Chapter 03：ネットワーク\n- [x] Chapter 04：io パッケージによる抽象化\n- [ ] Chapter 05：bufio パッケージによる buffered I/O\n- [ ] Chapter 06：fmt で学ぶ標準入力・出力\n- [ ] Chapter 07：bytes パッケージと strings パッケージ\n- [ ] Chapter 08：おわりに\n\n## 実行\n\nいくつか実装したサンプルコードの実行方法\n\n### ネットワーク I/O\n\nTCP サーバ / クライアントの実行方法\n\n```bash\n# TCP サーバの起動\ncd learn-io-from-golang/network_io/server\ngo run .\n\n# 別のターミナルから TCP クライアントを起動\ncd learn-io-from-golang/network_io/client\ngo run .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnukopy%2Flearn-io-from-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnukopy%2Flearn-io-from-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnukopy%2Flearn-io-from-golang/lists"}