<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>lirlia</author_name>
  <author_url>https://blog.hatena.ne.jp/lirlia/</author_url>
  <blog_title>フラミナル</blog_title>
  <blog_url>https://blog.framinal.life/</blog_url>
  <categories>
    <anon>Golang</anon>
    <anon>Tips</anon>
  </categories>
  <description>構造体の中に含まれる一部の要素を使って構造体のスライスを任意の順番にソートする方法です。 イメージとしては以下のような構造体がスライスに格納されているとします。 type user struct { name: string bloodType: string } Users = []user { {&quot;tanaka&quot;, &quot;O&quot;}, {&quot;kikuchi&quot;, &quot;A&quot;}, {&quot;ito&quot;, &quot;A&quot;}, {&quot;ishikawa&quot;, &quot;B&quot;}, {&quot;kato&quot;, &quot;AB&quot;}, } orderList := []string{&quot;O&quot;, &quot;AB&quot;, &quot;A&quot;, &quot;B&quot;} このUsersスライスをorderList…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.framinal.life%2Fentry%2F2021%2F06%2F29%2F213901&quot; title=&quot; 構造体のSliceを任意の順番にソートする方法 - フラミナル&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.user.blog.st-hatena.com/default_entry_og_image/73158536/1534511431670062</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-06-29 21:39:01</published>
  <title> 構造体のSliceを任意の順番にソートする方法</title>
  <type>rich</type>
  <url>https://blog.framinal.life/entry/2021/06/29/213901</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
