Answers for "golang delete element from slice"

Go
7

golang delete element from array

func RemoveIndex(s []string, index int) []string {
	return append(s[:index], s[index+1:]...)
}
Posted by: Guest on June-25-2020
0

golang array remove item

a[i] = a[len(a)-1] 
a = a[:len(a)-1]
Posted by: Guest on March-18-2021

Code answers related to "golang delete element from slice"

Browse Popular Code Answers by Language