Ignore first file (.keep)
parent
0fa3a2c06c
commit
d6a84520f4
|
@ -1,7 +1,6 @@
|
|||
package WorstCaptcha
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"math/rand"
|
||||
|
@ -12,6 +11,7 @@ func GetRandomWord() string {
|
|||
dir, _ := os.Getwd()
|
||||
|
||||
files, _ := ioutil.ReadDir(dir + "/images/")
|
||||
files = files[1:]
|
||||
|
||||
file := files[rand.Intn(len(files))].Name()
|
||||
|
||||
|
|
Loading…
Reference in New Issue