1
0
mirror of https://github.com/golang/go synced 2024-11-19 22:54:39 -07:00

html/template, net/http, websocket: fix import paths in comments

R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/5411048
This commit is contained in:
Lucio De Re 2011-11-18 18:33:44 -05:00 committed by Russ Cox
parent 29e3ef88af
commit 5b9d7825ed
4 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@ trusted, while Execute's data parameter is not. More details are provided below.
Example Example
import "template" import "text/template"
... ...
t, err := (&template.Set{}).Parse(`{{define "T"}}Hello, {{.}}!{{end}}`) t, err := (&template.Set{}).Parse(`{{define "T"}}Hello, {{.}}!{{end}}`)
err = t.Execute(out, "T", "<script>alert('you have been pwned')</script>") err = t.Execute(out, "T", "<script>alert('you have been pwned')</script>")

View File

@ -1013,8 +1013,8 @@ func (srv *Server) Serve(l net.Listener) error {
// package main // package main
// //
// import ( // import (
// "http"
// "io" // "io"
// "net/http"
// "log" // "log"
// ) // )
// //
@ -1044,8 +1044,8 @@ func ListenAndServe(addr string, handler Handler) error {
// A trivial example server is: // A trivial example server is:
// //
// import ( // import (
// "http"
// "log" // "log"
// "net/http"
// ) // )
// //
// func handler(w http.ResponseWriter, req *http.Request) { // func handler(w http.ResponseWriter, req *http.Request) {

View File

@ -72,8 +72,8 @@ A trivial example client:
package main package main
import ( import (
"http"
"log" "log"
"net/http"
"strings" "strings"
"websocket" "websocket"
) )

View File

@ -60,8 +60,8 @@ A trivial example server:
package main package main
import ( import (
"http"
"io" "io"
"net/http"
"websocket" "websocket"
) )