X-Git-Url: http://www.git.cypherpunks.ru/?p=gocheese.git;a=blobdiff_plain;f=refresh.go;h=ea3af19c049d4738273a63f9189267577914e5f7;hp=9aa4849e2e06a88f401bb1b8b0586db992c23529;hb=HEAD;hpb=1af7a2893750e0eaa7ee2465803a660b712153c4 diff --git a/refresh.go b/refresh.go index 9aa4849..3d134a0 100644 --- a/refresh.go +++ b/refresh.go @@ -1,19 +1,17 @@ -/* -GoCheese -- Python private package repository and caching proxy -Copyright (C) 2019-2023 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 @@ -72,7 +70,7 @@ func blake2b256New() hash.Hash { func agentedReq(url string) *http.Request { req, err := http.NewRequest("GET", url, nil) if err != nil { - log.Fatalln(err) + log.Fatal(err) } req.Header.Set("User-Agent", UserAgent) return req @@ -148,7 +146,7 @@ func refreshDir( Name: MDFieldToRecField[recField], Value: jsonField, }); err != nil { - log.Fatalln(err) + log.Fatal(err) } } for _, m := range []RecFieldToValuesMap{ @@ -165,7 +163,7 @@ func refreshDir( Name: MDFieldToRecField[m.recField], Value: v, }); err != nil { - log.Fatalln(err) + log.Fatal(err) } } } @@ -204,7 +202,7 @@ func refreshDir( Name: MDFieldToRecField[recField], Value: jsonField, }); err != nil { - log.Fatalln(err) + log.Fatal(err) } } @@ -217,7 +215,7 @@ func refreshDir( Name: MDFieldToRecField[m.recField], Value: v, }); err != nil { - log.Fatalln(err) + log.Fatal(err) } } } @@ -229,7 +227,7 @@ func refreshDir( if _, err = wr.WriteFieldMultiline( MDFieldDescription, lines, ); err != nil { - log.Fatalln(err) + log.Fatal(err) } }