move indexOf into the vbantxt package.

improve the warning message on invalid bps value
This commit is contained in:
2024-11-03 16:15:05 +00:00
parent 7a844e3624
commit ae170ca572
4 changed files with 16 additions and 14 deletions

10
util.go Normal file
View File

@@ -0,0 +1,10 @@
package vbantxt
func indexOf[T comparable](collection []T, e T) int {
for i, x := range collection {
if x == e {
return i
}
}
return -1
}