/*
GoCheese -- Python private package repository and caching proxy
-Copyright (C) 2019-2021 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2019-2022 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
"fmt"
"hash"
"io"
- "io/ioutil"
"log"
"os"
"path/filepath"
pkgName, fn, fnHash, hasherName string,
hasher hash.Hash, digest []byte,
) bool {
- expected, err := ioutil.ReadFile(fnHash)
+ expected, err := os.ReadFile(fnHash)
if err != nil {
log.Fatal(err)
}
}
func goodIntegrity() bool {
- dirs, err := ioutil.ReadDir(Root)
+ dirs, err := os.ReadDir(Root)
if err != nil {
log.Fatal(err)
}
isGood := true
var pkgName string
for _, dir := range dirs {
- files, err := ioutil.ReadDir(filepath.Join(Root, dir.Name()))
+ files, err := os.ReadDir(filepath.Join(Root, dir.Name()))
if err != nil {
log.Fatal(err)
}