configurable input directory
This commit is contained in:
2
fs.go
2
fs.go
@ -53,7 +53,7 @@ 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("/home/gator/Photos/")
|
||||
dir := getImagesList(ConfigRegister.InputDir)
|
||||
index := rand.Intn(len(dir))
|
||||
return dir[index]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user