thoas / go-funk

A modern Go utility library which provides helpers (map, find, contains, filter, ...)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement funk.Remove from a slice by index

tom10271 opened this issue · comments

commented

You can do it with a pure typesafe implementation:

func RemoveInt(slice []int, s int) []int {
    return append(slice[:s], slice[s+1:]...)
}

But I think its god ideia. Add to funk. If you wanna. I can do and open PR.