зеркало из https://github.com/golang/tools.git
godoc/proxy: remove unused cacheKey function
Change-Id: Ic7392e973de4a8c9232e9c55ed76c4ca799d68b4 Reviewed-on: https://go-review.googlesource.com/86315 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Родитель
951512dfed
Коммит
08da88d271
|
@ -10,10 +10,8 @@ package proxy
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/sha1"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
|
@ -121,12 +119,6 @@ func flatten(seq []Event) string {
|
|||
return buf.String()
|
||||
}
|
||||
|
||||
func cacheKey(body string) string {
|
||||
h := sha1.New()
|
||||
io.WriteString(h, body)
|
||||
return fmt.Sprintf("prog-%x", h.Sum(nil))
|
||||
}
|
||||
|
||||
func share(w http.ResponseWriter, r *http.Request) {
|
||||
if googleCN(r) {
|
||||
http.Error(w, http.StatusText(http.StatusForbidden), http.StatusForbidden)
|
||||
|
|
Загрузка…
Ссылка в новой задаче