1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:04:45 -07:00

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:
Andrew Bonventre 2018-01-04 19:52:29 -05:00
parent 951512dfed
commit 08da88d271

View File

@ -10,10 +10,8 @@ package proxy
import ( import (
"bytes" "bytes"
"crypto/sha1"
"encoding/json" "encoding/json"
"fmt" "fmt"
"io"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/http/httputil" "net/http/httputil"
@ -121,12 +119,6 @@ func flatten(seq []Event) string {
return buf.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) { func share(w http.ResponseWriter, r *http.Request) {
if googleCN(r) { if googleCN(r) {
http.Error(w, http.StatusText(http.StatusForbidden), http.StatusForbidden) http.Error(w, http.StatusText(http.StatusForbidden), http.StatusForbidden)