<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>stefafafan</author_name>
  <author_url>https://blog.hatena.ne.jp/stefafafan/</author_url>
  <blog_title>stefafafan の fa は3つです</blog_title>
  <blog_url>https://blog.stenyan.jp/</blog_url>
  <categories>
    <anon>技術</anon>
  </categories>
  <description>Go言語でsliceの重複排除について書きます。Go 1.21前提です。 slices パッケージを使っての重複排除 Go 1.21から slices パッケージが増えました。ここに生えている関数を利用して重複削除のコードが書けます。 pkg.go.dev例えば int の slice の重複排除は以下のように書けます。 integers := []int{1, 2, 2, 1} slices.Sort(integers) // [1 1 2 2] uniqValues := slices.Compact(integers) // [1 2] slices.Compact は連続する値を1つに…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.stenyan.jp%2Fentry%2F2023%2F09%2F17%2F194146&quot; title=&quot;Go言語でsliceの重複排除 (slicesやsamber/loパッケージを使う場合) - stefafafan の fa は3つです&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>2023-09-17 19:41:46</published>
  <title>Go言語でsliceの重複排除 (slicesやsamber/loパッケージを使う場合)</title>
  <type>rich</type>
  <url>https://blog.stenyan.jp/entry/2023/09/17/194146</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
