mirror of
https://github.com/golang/go
synced 2024-11-21 21:24:45 -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:
parent
29e3ef88af
commit
5b9d7825ed
@ -29,7 +29,7 @@ trusted, while Execute's data parameter is not. More details are provided below.
|
||||
|
||||
Example
|
||||
|
||||
import "template"
|
||||
import "text/template"
|
||||
...
|
||||
t, err := (&template.Set{}).Parse(`{{define "T"}}Hello, {{.}}!{{end}}`)
|
||||
err = t.Execute(out, "T", "<script>alert('you have been pwned')</script>")
|
||||
|
@ -1013,8 +1013,8 @@ func (srv *Server) Serve(l net.Listener) error {
|
||||
// package main
|
||||
//
|
||||
// import (
|
||||
// "http"
|
||||
// "io"
|
||||
// "net/http"
|
||||
// "log"
|
||||
// )
|
||||
//
|
||||
@ -1044,8 +1044,8 @@ func ListenAndServe(addr string, handler Handler) error {
|
||||
// A trivial example server is:
|
||||
//
|
||||
// import (
|
||||
// "http"
|
||||
// "log"
|
||||
// "net/http"
|
||||
// )
|
||||
//
|
||||
// func handler(w http.ResponseWriter, req *http.Request) {
|
||||
|
@ -72,8 +72,8 @@ A trivial example client:
|
||||
package main
|
||||
|
||||
import (
|
||||
"http"
|
||||
"log"
|
||||
"net/http"
|
||||
"strings"
|
||||
"websocket"
|
||||
)
|
||||
|
@ -60,8 +60,8 @@ A trivial example server:
|
||||
package main
|
||||
|
||||
import (
|
||||
"http"
|
||||
"io"
|
||||
"net/http"
|
||||
"websocket"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user