X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=json.go;h=7f1f3d77624764e3cb307f4f88d2dd215f6b8c1b;hb=refs%2Fheads%2Fmaster;hp=4cb295e840c5a7b153cb83890bc7be1ce4e13607;hpb=a138af795fb0ad0cece96ab5ded469f097397665;p=gocheese.git diff --git a/json.go b/json.go index 4cb295e..7f1f3d7 100644 --- a/json.go +++ b/json.go @@ -1,26 +1,23 @@ -/* -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 import ( "bytes" "encoding/json" - "io/ioutil" "log" "net/http" "os" @@ -35,7 +32,7 @@ func getMD(pkgName, version string) (*PkgMeta, []*PkgReleaseInfo, error) { if err != nil { return nil, nil, err } - md, err := ioutil.ReadFile(filepath.Join(Root, pkgName, MDFile)) + md, err := os.ReadFile(filepath.Join(Root, pkgName, MDFile)) if err != nil { if !os.IsNotExist(err) { return nil, nil, err