X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=upload.go;h=5ab1048c3cefd07b675493983d5d70c802bec80a;hb=3bbd67eb5067bf180ed260acee4a2c1a6f6db9ec;hp=f789fbe3ded1a831a3b707c1c8c5df53aa14b70f;hpb=371b9da450b741c6dc50cf5427fcbdec4335d0fc;p=gocheese.git diff --git a/upload.go b/upload.go index f789fbe..5ab1048 100644 --- a/upload.go +++ b/upload.go @@ -1,7 +1,7 @@ /* GoCheese -- Python private package repository and caching proxy -Copyright (C) 2019-2021 Sergey Matveev - 2019-2021 Elena Balakhonova +Copyright (C) 2019-2022 Sergey Matveev + 2019-2022 Elena Balakhonova 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 ( "crypto/sha256" "encoding/hex" "io" - "io/ioutil" "log" "net/http" "os" @@ -215,7 +214,7 @@ func serveUpload(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - sig, err := ioutil.ReadAll(src) + sig, err := io.ReadAll(src) src.Close() if err != nil { log.Println("error", r.RemoteAddr, filename, err)