<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>uc_ebuc</author_name>
  <author_url>https://blog.hatena.ne.jp/uc_ebuc/</author_url>
  <blog_title>雑多なブログ</blog_title>
  <blog_url>https://cufl.hateblo.jp/</blog_url>
  <categories>
    <anon>go</anon>
  </categories>
  <description>簡易的にランダムな数字を生成する方法を調べた。 goでランダムな数字を生成する場合 math/rand が使用できる。 使用方法は至ってシンプル。 package main import ( &quot;time&quot; &quot;math/rand&quot; ) func main() { rand.Seed(time.Now().Unix()) num := rand.Intn(6) println(num) } なお、math/rand は特定されると問題になるような値の生成には使わない方が良い（例: ユーザーIDやセッションIDなど）。 厳密にランダムな値を生成する場合は、crypt/rand を使う方が良い。 例で…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcufl.hateblo.jp%2Fentry%2F2022%2F02%2F12%2F120036&quot; title=&quot;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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-02-12 12:00:36</published>
  <title>go - ランダムな数字を生成する</title>
  <type>rich</type>
  <url>https://cufl.hateblo.jp/entry/2022/02/12/120036</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
