]> Cypherpunks repositories - gostls13.git/commitdiff
net/rpc: use html/template to render html
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 10 Jul 2014 02:33:45 +0000 (19:33 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Thu, 10 Jul 2014 02:33:45 +0000 (19:33 -0700)
Found using the vet check in CL 106370045.

This is a second attempt at CL 101670044, which omitted the deps_test change.

This adds dependencies to net/rpc:

        encoding
        encoding/base64
        encoding/json
        html
        unicode/utf16

The obvious correctness and security warrants the additional dependencies.

LGTM=rsc
R=r, minux, rsc, adg
CC=golang-codereviews
https://golang.org/cl/110890043

src/pkg/go/build/deps_test.go
src/pkg/net/rpc/debug.go

index 22ce8ff15af32403a12ed55aeb23ff135d3ccbc5..9509f780512c42399a52193803a7f285dbcd678f 100644 (file)
@@ -327,7 +327,7 @@ var pkgDeps = map[string][]string{
        "net/http/httptest": {"L4", "NET", "OS", "crypto/tls", "flag", "net/http"},
        "net/http/httputil": {"L4", "NET", "OS", "net/http"},
        "net/http/pprof":    {"L4", "OS", "html/template", "net/http", "runtime/pprof"},
-       "net/rpc":           {"L4", "NET", "encoding/gob", "net/http", "text/template"},
+       "net/rpc":           {"L4", "NET", "encoding/gob", "html/template", "net/http"},
        "net/rpc/jsonrpc":   {"L4", "NET", "encoding/json", "net/rpc"},
 }
 
index 926466d62551f551bda67f736ca90e2ab36dd7f4..98b2c1c6c4aba0a50bc0c60bf2bf78eed4a9ea0a 100644 (file)
@@ -11,9 +11,9 @@ package rpc
 
 import (
        "fmt"
+       "html/template"
        "net/http"
        "sort"
-       "text/template"
 )
 
 const debugText = `<html>