<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ryu121</author_name>
  <author_url>https://blog.hatena.ne.jp/ryu121/</author_url>
  <blog_title>go言語入門学習サイト</blog_title>
  <blog_url>https://gopro1.hateblo.jp/</blog_url>
  <categories>
    <anon>go言語　switch</anon>
  </categories>
  <description>go言語でswitchの処理をコードで動かします。 ifとの違いも比較しましょう。【基本】基本的にswitchはif文と同じような動きします。switch文では処理のないcaseを追加するだけで共通処理が実行されifより簡素に処理ができます。 switch x { case value1: // x == value1のときに、実行されるコード case value2: // x == value2のときに、実行されるコード ... default: // xがどの値にも一致しない場合に実行されるコード }【具体例】 package mainimport ( &quot;fmt&quot; &quot;time&quot; )fun…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgopro1.hateblo.jp%2Fentry%2F2024%2F01%2F27%2F121500&quot; title=&quot;go言語のswitchの処理を時間帯を表すプログラムで見よう - go言語入門学習サイト&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://www11.a8.net/0.gif?a8mat=3HG58D+GCVF0Q+3GWO+6DJW2</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-01-27 12:15:00</published>
  <title>go言語のswitchの処理を時間帯を表すプログラムで見よう</title>
  <type>rich</type>
  <url>https://gopro1.hateblo.jp/entry/2024/01/27/121500</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
