Update 15.2.md (#794)

This commit is contained in:
忽如寄
2021-10-23 12:00:33 +08:00
committed by GitHub
parent 381d375e40
commit d5578df00a

View File

@@ -64,7 +64,7 @@ http.ListenAndServe(":8080", http.HandlerFunc(HelloServer))
2`fmt.Fprint``fmt.Fprintf` 都是可以用来写入 `http.ResponseWriter` 的函数(他们实现了 `io.Writer`)。
比如我们可以使用
```go
fmt.Fprintf(w, "<h1>%s<h1><div>%s</div>", title, body)
fmt.Fprintf(w, "<h1>%s</h1><div>%s</div>", title, body)
```
来构建一个非常简单的网页并插入 `title``body` 的值。