more gofix

Change-Id: I830091fab60f51751333666ab20321d2105d3818
This commit is contained in:
Brad Fitzpatrick 2011-08-25 19:15:30 +04:00
parent 88c89757e1
commit 4a0fa68859
1 changed files with 2 additions and 3 deletions

View File

@ -32,6 +32,7 @@ import (
"strings"
"template"
"time"
"url"
)
const defaultAddr = ":31798" // default webserver address
@ -69,7 +70,6 @@ func htmlFmt(w io.Writer, format string, x ...interface{}) {
writeAny(w, true, x[0])
}
// Template formatter for "html-esc" format.
func htmlEscFmt(w io.Writer, format string, x ...interface{}) {
var buf bytes.Buffer
@ -104,7 +104,6 @@ func writeText(w io.Writer, text []byte, html bool) {
w.Write(text)
}
func applyTemplate(t *template.Template, name string, data interface{}) []byte {
var buf bytes.Buffer
if err := t.Execute(&buf, data); err != nil {
@ -267,7 +266,7 @@ func main() {
mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir(filepath.Join(*root, "static")))))
mux.Handle("/talks/", http.StripPrefix("/talks/", http.FileServer(http.Dir(filepath.Join(*root, "talks")))))
gerritUrl, _ := http.ParseURL("http://gerrit-proxy:8000/")
gerritUrl, _ := url.Parse("http://gerrit-proxy:8000/")
var gerritHandler http.Handler = http.NewSingleHostReverseProxy(gerritUrl)
if *httpsAddr != "" {
proxyHandler := gerritHandler