<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Deletion on Nalar</title>
    <link>https://nalar.dev/tags/deletion/</link>
    <description>Recent content in Deletion on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 12 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/deletion/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Remove a Range from Go Slices with slices.Delete</title>
      <link>https://nalar.dev/remove-range-from-go-slices-with-slices-delete/</link>
      <pubDate>Sat, 12 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/remove-range-from-go-slices-with-slices-delete/</guid>
      <description>&lt;p&gt;Removing one or more adjacent elements from a Go slice used to mean writing the reslicing and &lt;code&gt;append&lt;/code&gt; expression by hand. &lt;code&gt;slices.Delete&lt;/code&gt; gives that operation a direct name and handles the vacated tail slots for you.&lt;/p&gt;&#xA;&lt;p&gt;The call uses the same half-open range convention as slicing: &lt;code&gt;slices.Delete(s, i, j)&lt;/code&gt; removes indexes &lt;code&gt;i&lt;/code&gt; through &lt;code&gt;j-1&lt;/code&gt;. The returned slice is shorter, so keep the return value.&lt;/p&gt;&#xA;&lt;h2 id=&#34;remove-a-range-with-slicesdelete&#34;&gt;Remove a range with slices.Delete&lt;/h2&gt;&#xA;&lt;p&gt;A basic deletion looks like this:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
