diff --git a/doc/effective_go.html b/doc/effective_go.html index 684f108de9..728e07be11 100644 --- a/doc/effective_go.html +++ b/doc/effective_go.html @@ -2435,7 +2435,6 @@ import ( "http" "io" "log" - "strings" "template" ) @@ -2460,7 +2459,7 @@ func QR(c *http.Conn, req *http.Request) { } func UrlHtmlFormatter(w io.Writer, v interface{}, fmt string) { - template.HTMLEscape(w, strings.Bytes(http.URLEscape(v.(string)))) + template.HTMLEscape(w, []byte(http.URLEscape(v.(string)))) } diff --git a/doc/htmlgen.go b/doc/htmlgen.go index 8d44fc0787..e4a2b52933 100644 --- a/doc/htmlgen.go +++ b/doc/htmlgen.go @@ -15,22 +15,21 @@ import ( "bytes"; "log"; "os"; - "strings"; ) var ( lines = make([][]byte, 0, 10000); // assume big enough linebuf = make([]byte, 10000); // assume big enough - empty = strings.Bytes(""); - newline = strings.Bytes("\n"); - tab = strings.Bytes("\t"); - quote = strings.Bytes(`"`); + empty = []byte(""); + newline = []byte("\n"); + tab = []byte("\t"); + quote = []byte(`"`); - sectionMarker = strings.Bytes("----\n"); - preStart = strings.Bytes("
");
- preEnd = strings.Bytes("\n");
- pp = strings.Bytes("\n"); + sectionMarker = []byte("----\n"); + preStart = []byte("
");
+ preEnd = []byte("\n");
+ pp = []byte("\n"); ); func main() { @@ -119,7 +118,7 @@ func headings() { b := bufio.NewWriter(os.Stdout); for i, l := range lines { if i > 0 && bytes.Equal(l, sectionMarker) { - lines[i-1] = strings.Bytes("