<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>imagawa_yakata</author_name>
  <author_url>https://blog.hatena.ne.jp/imagawa_yakata/</author_url>
  <blog_title>今川館</blog_title>
  <blog_url>https://imagawa.hatenadiary.jp/</blog_url>
  <categories>
    <anon>Go初学者</anon>
  </categories>
  <description>『プログラミング言語Go』のスピナー 予約語「go」を使うとメインgoroutineと別のgoroutineで動かせる 『プログラミング言語Go』の「ゴルーチンとチャネル」という章を読んでいて、メインルーチンの処理中にスピナーを回すサンプルコードが出てきたので自分でも試していた。この、スピナーのコードが以下の通り、1文字出力してはキャリッジリターン「\r」でカーソル位置を戻して上書きを繰り返すものなのだが、これに予約語「go」を付けると別ルーチンで動いてくれる。 func spinner(delay time.Duration) { for { for _, r := range `-\|/`…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fimagawa.hatenadiary.jp%2Fentry%2F2016%2F12%2F17%2F190000&quot; title=&quot;ANSIエスケープコードを使ってコンソールアニメーション - 今川館&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>https://cdn-ak.f.st-hatena.com/images/fotolife/i/imagawa_yakata/20161211/20161211171023.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-12-17 19:00:00</published>
  <title>ANSIエスケープコードを使ってコンソールアニメーション</title>
  <type>rich</type>
  <url>https://imagawa.hatenadiary.jp/entry/2016/12/17/190000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
