replaced ioutil.ReadDir by os.ReadDir
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b102d2e916
commit
6cef9b045f
4
src/cache/cache.go
vendored
4
src/cache/cache.go
vendored
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user