seed can be specified to reproduce output
This commit is contained in:
2
fs.go
2
fs.go
@ -7,7 +7,6 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// load an image from a file into an Image value
|
||||
@ -52,7 +51,6 @@ func getImagesList(path string) []string {
|
||||
|
||||
// Randomly choose x number of image from a given folder
|
||||
func getRandomImage() string {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
dir := getImagesList(ConfigRegister.InputDir)
|
||||
index := rand.Intn(len(dir))
|
||||
return dir[index]
|
||||
|
||||
Reference in New Issue
Block a user