✨ Pick file
This commit is contained in:
parent
53b2e169d0
commit
afb5953ea0
2 changed files with 11 additions and 1 deletions
10
files/pick.go
Normal file
10
files/pick.go
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
package files
|
||||
|
||||
import "math/rand"
|
||||
|
||||
func PickRandomFile() string {
|
||||
files := GetCandidates()
|
||||
idx := rand.Intn(len(files))
|
||||
|
||||
return files[idx]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue