mirror of
https://github.com/onyx-and-iris/vbantxt.git
synced 2026-04-07 01:33:30 +00:00
remove old cli files
This commit is contained in:
23
util.go
23
util.go
@@ -1,23 +0,0 @@
|
||||
package main
|
||||
|
||||
import "flag"
|
||||
|
||||
// indexOf returns the index of an element in an array
|
||||
func indexOf[T comparable](collection []T, e T) int {
|
||||
for i, x := range collection {
|
||||
if x == e {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
func isFlagPassed(name string) bool {
|
||||
found := false
|
||||
flag.Visit(func(f *flag.Flag) {
|
||||
if f.Name == name {
|
||||
found = true
|
||||
}
|
||||
})
|
||||
return found
|
||||
}
|
||||
Reference in New Issue
Block a user