fix variable scoping
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
c8cbebb7f9
commit
bff4c107c1
4
main.go
4
main.go
|
@ -42,7 +42,7 @@ var (
|
|||
|
||||
// Preload cached list of files and hashes
|
||||
func init() {
|
||||
romCache := ROMCache{}
|
||||
romCache = ROMCache{}
|
||||
romCache.Cached = make(map[string]bool)
|
||||
go updateROMCache("public")
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ func updateROMCache(romDirectory string) {
|
|||
|
||||
// skip already cached files
|
||||
romCache.Lock()
|
||||
if romCache.Cached[d.Name()] {
|
||||
if _, ok := romCache.Cached[d.Name()]; ok {
|
||||
romCache.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue