diff --git a/src/cache/cache.go b/src/cache/cache.go index 4399eee..a6970f2 100644 --- a/src/cache/cache.go +++ b/src/cache/cache.go @@ -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]