(w http.ResponseWriter, r *http.Request)
| 84 | } |
| 85 | |
| 86 | func gzipUpdateHandler(w http.ResponseWriter, r *http.Request) { |
| 87 | log.Println("got a request!") |
| 88 | version := "2020.09.02" |
| 89 | h := sha256.New() |
| 90 | fmt.Fprint(h, version) |
| 91 | checksum := fmt.Sprintf("%x", h.Sum(nil)) |
| 92 | |
| 93 | url := fmt.Sprintf("http://%s/gzip-download.tgz", r.Host) |
| 94 | v := VersionResponse{URL: url, Version: version, Checksum: checksum, ShouldUpdate: true} |
| 95 | respondWithJSON(w, v, http.StatusOK) |
| 96 | } |
| 97 | |
| 98 | func compressedDownloadHandler(w http.ResponseWriter, r *http.Request) { |
| 99 | version := "2020.09.02" |
nothing calls this directly
no test coverage detected