]> Sergey Matveev's repositories - sgblog.git/commitdiff
Excess loop
authorSergey Matveev <stargrave@stargrave.org>
Thu, 23 Mar 2023 10:59:22 +0000 (13:59 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 23 Mar 2023 11:01:01 +0000 (14:01 +0300)
cmd/sgblog/http.go

index c8365b6570abfabb621ccb208a0c27440f27b87e..58515d8de88cb85fd6b4579bb8e7a6002444127a 100644 (file)
@@ -212,9 +212,7 @@ func serveHTTP() {
                cfg.CommentsNotesRef,
                cfg.CommentsEmail,
        }
-       for _, gitURL := range cfg.GitURLs {
-               etagHashForWeb = append(etagHashForWeb, gitURL)
-       }
+       etagHashForWeb = append(etagHashForWeb, cfg.GitURLs...)
 
        headHash, err := initRepo(cfg)
        if err != nil {