<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>zetamatta</author_name>
  <author_url>https://blog.hatena.ne.jp/zetamatta/</author_url>
  <blog_title>標準愚痴出力</blog_title>
  <blog_url>https://zetamatta.hatenablog.com/</blog_url>
  <categories>
    <anon>Go</anon>
  </categories>
  <description>テキストファイルなどを扱う時： データ読み取り時にエラーが発生した時はただちに終わる ただし、そのエラーが EOF の場合は、有効データがある可能性があるため、それを処理してから終わる という定番処理がある。 これを素直に実装すると次のようになる。 ( 読み取り処理は fetch, 加工処理は work という関数で表現 ) for { data, err := fetch() if err != nil &amp;&amp; !errors.Is(err, io.EOF) { return err } work(data) if errors.Is(err, io.EOF) { break } } これ、e…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fzetamatta.hatenablog.com%2Fentry%2F2025%2F12%2F21%2F112224&quot; title=&quot;テキストファイルの行処理のイディオム - 標準愚痴出力&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-12-21 11:22:24</published>
  <title>テキストファイルの行処理のイディオム</title>
  <type>rich</type>
  <url>https://zetamatta.hatenablog.com/entry/2025/12/21/112224</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
