X-Git-Url: http://www.git.cypherpunks.ru/?p=gocheese.git;a=blobdiff_plain;f=hr.go;h=045360d4891fb30a4ef4287e5fd7aa668649e0c3;hp=687f4607e03c80e525ddfc656cab0606f8066605;hb=HEAD;hpb=a138af795fb0ad0cece96ab5ded469f097397665 diff --git a/hr.go b/hr.go index 687f460..c4531bd 100644 --- a/hr.go +++ b/hr.go @@ -1,19 +1,17 @@ -/* -GoCheese -- Python private package repository and caching proxy -Copyright (C) 2019-2022 Sergey Matveev - -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 -the Free Software Foundation, version 3 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +// GoCheese -- Python private package repository and caching proxy +// Copyright (C) 2019-2024 Sergey Matveev +// +// 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 +// the Free Software Foundation, version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . package main @@ -21,7 +19,6 @@ import ( "bytes" _ "embed" "html/template" - "io/ioutil" "log" "net/http" "os" @@ -40,7 +37,7 @@ var ( ) func serveHRRoot(w http.ResponseWriter, r *http.Request) { - files, err := ioutil.ReadDir(Root) + files, err := os.ReadDir(Root) if err != nil { log.Println("error", r.RemoteAddr, "hr-root", err) http.Error(w, err.Error(), http.StatusInternalServerError)