Problem
I have array of structs:
type Config struct { Applications []Application }
Note: Config - is a struct fo
I think the simple way is
var ( slice = []int{1,2,3,4,5} pos int ) for _, i := range slice { if i == 3 { slice = append(slice[:pos], slice[pos+1:]...) if pos > 0 { pos = pos - 1 } continue } pos++ }
here is... https://play.golang.org/p/pK3B5Mii9k