go-starter icon indicating copy to clipboard operation
go-starter copied to clipboard

Since You have migrated to go 1.21, this code is redundant

Open driif opened this issue 1 year ago • 0 comments

https://github.com/allaboutapps/go-starter/blob/c2482d4d3f4ad0e2ceef3bbacf426c5da0ff9ddc/internal/util/slice.go#L3C1-L12C2

Since You have migrated to go 1.21, this code is redundant. In go 1.21 was added a new package "slices to std lib"

import (
  "slices"
)

func IfFooContainsBar() bool {
  return slices.Contains(foo_slice, bar_string)
}

driif avatar Mar 03 '24 13:03 driif