]> Cypherpunks.ru repositories - gocheese.git/blobdiff - refresh.go
More convenient trusted-host
[gocheese.git] / refresh.go
index 9aa4849e2e06a88f401bb1b8b0586db992c23529..3d134a0c2274973d2e2306cc3a2eed7dca54bd29 100644 (file)
@@ -1,19 +1,17 @@
-/*
-GoCheese -- Python private package repository and caching proxy
-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
-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 <http://www.gnu.org/licenses/>.
-*/
+// GoCheese -- Python private package repository and caching proxy
+// Copyright (C) 2019-2024 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
+// 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 <http://www.gnu.org/licenses/>.
 
 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)
                        }
                }