<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>memorude</author_name>
  <author_url>https://blog.hatena.ne.jp/memorude/</author_url>
  <blog_title>PUROGU LADESU</blog_title>
  <blog_url>https://puroguradesu.hatenadiary.jp/</blog_url>
  <categories>
    <anon>Golang</anon>
  </categories>
  <description>gorutine goルーチン 前に go をつけると並列処理できる gorutineが終了しなくても、メインが終わればプログラムは終了してしまう。 それを避けるために sync.WaitGroupを使う。並列処理の数だけAdd()を行う。（Doneが呼ばれる回数） wg.Wait()でwg.Done()が呼ばれるまで待つ func goroutine(s string, wg *sync.WaitGroup) { // defer wg.Done() for i := 0; i &lt; 5; i++ { time.Sleep(100 * time.Millisecond) fmt.Println…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpuroguradesu.hatenadiary.jp%2Fentry%2F2020%2F12%2F04%2F115617&quot; title=&quot;【Golang】 7 Goroutine - PUROGU LADESU&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>2020-12-04 11:56:17</published>
  <title>【Golang】 7 Goroutine</title>
  <type>rich</type>
  <url>https://puroguradesu.hatenadiary.jp/entry/2020/12/04/115617</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
