aboutsummaryrefslogtreecommitdiff
path: root/go/utils/slices.go
blob: d2bc04c1fd0cc25034a0479b184dfdc0d1e542cd (plain)
1
2
3
4
5
6
7
8
9
package utils

func TypedSliceToInterfaceSlice[T any](s []T) []interface{} {
	is := make([]interface{}, 0, len(s))
	for _, t := range s {
		is = append(is, t)
	}
	return is
}