mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2025-10-19 21:43:15 +00:00
ch4: fix code path
This commit is contained in:
@@ -6,9 +6,8 @@
|
||||
|
||||
{% raw %}
|
||||
|
||||
<u><i>gopl.io/ch4/issuesreport</i></u>
|
||||
```Go
|
||||
gopl.io/ch4/issuesreport
|
||||
|
||||
const templ = `{{.TotalCount}} issues:
|
||||
{{range .Items}}----------------------------------------
|
||||
Number: {{.Number}}
|
||||
@@ -89,9 +88,8 @@ Age: 695 days
|
||||
|
||||
{% raw %}
|
||||
|
||||
<u><i>gopl.io/ch4/issueshtml</i></u>
|
||||
```Go
|
||||
gopl.io/ch4/issueshtml
|
||||
|
||||
import "html/template"
|
||||
|
||||
var issueList = template.Must(template.New("issuelist").Parse(`
|
||||
@@ -142,9 +140,8 @@ $ ./issueshtml repo:golang/go 3133 10535 >issues2.html
|
||||
|
||||
{% raw %}
|
||||
|
||||
<u><i>gopl.io/ch4/autoescape</i></u>
|
||||
```Go
|
||||
gopl.io/ch4/autoescape
|
||||
|
||||
func main() {
|
||||
const templ = `<p>A: {{.A}}</p><p>B: {{.B}}</p>`
|
||||
t := template.Must(template.New("escape").Parse(templ))
|
||||
|
Reference in New Issue
Block a user