GoSliceslices.Index

Returns the first index i where s[i] == v, or -1. (Go 1.21+)

문법

slices.Index(s []E, v E) int