You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.imxd.top/mkeeler/go-immutable

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.imxd.top/mkeeler/go-immutable

v0.1.0
Go
Version published
Created
Source

go-immutable

Build Status Go Report Card PkgGoDev

This library contains functions to operate on Go types in a generic and immutable way. Most of the overall behavior exists in the standard library as mutating functions already and you should really only use this library if you specifically require the immutability guarantees.

See it in action:

package foo

import (
   "slices"
   
   "github.com/mkeeler/go-immutable/immutableslice"
)

func FindAndRemove(s []int, v int) []int {
   idx := slices.Index(s, v)
   return immutableslice.Delete(s, idx, idx+1)
}

FAQs

Package last updated on 27 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts