]> Cypherpunks.ru repositories - gocheese.git/blobdiff - integrity.go
Raise copyright years
[gocheese.git] / integrity.go
index cc6399ef51ee00bf87c7c2bd16148c54cef37db7..24f14aa939558ee212754f4642a5f7f89ff74074 100644 (file)
@@ -1,6 +1,6 @@
 /*
 GoCheese -- Python private package repository and caching proxy
-Copyright (C) 2019-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2019-2023 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
@@ -24,7 +24,6 @@ import (
        "fmt"
        "hash"
        "io"
-       "io/ioutil"
        "log"
        "os"
        "path/filepath"
@@ -37,7 +36,7 @@ func checkFile(
        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)
        }
@@ -64,7 +63,7 @@ func checkFile(
 }
 
 func goodIntegrity() bool {
-       dirs, err := ioutil.ReadDir(Root)
+       dirs, err := os.ReadDir(Root)
        if err != nil {
                log.Fatal(err)
        }
@@ -75,7 +74,7 @@ func goodIntegrity() bool {
        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)
                }