replaced ioutil.ReadDir by os.ReadDir
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2022-11-02 17:13:35 +01:00
parent b102d2e916
commit 6cef9b045f

4
src/cache/cache.go vendored
View File

@ -5,7 +5,6 @@ import (
"encoding/hex"
"fmt"
"io"
"io/ioutil"
"log"
"mime"
"net/http"
@ -145,8 +144,9 @@ func (c *Cache) Close() {
c.waitGroup.Wait()
}
// Migrate converts old files to newer format
func (c *Cache) Migrate(pathname *string) (err error) {
files, err := ioutil.ReadDir(*pathname)
files, err := os.ReadDir(*pathname)
for _, f := range files {
if strings.HasSuffix(f.Name(), ".json") {
basename := strings.Split(f.Name(), ".")[0]