Browse Source

Ignore first file (.keep)

master
Elis Axelsson 4 years ago
parent
commit
d6a84520f4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/WorstCaptcha/GetWord.go

+ 1
- 1
src/WorstCaptcha/GetWord.go View File

@@ -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…
Cancel
Save