Merge pull request #1153 from attilanagy/fix_type_in_04_1

Fix the type of request.Form in 04.1
This commit is contained in:
astaxie
2021-01-15 23:20:45 +08:00
committed by GitHub
6 changed files with 14 additions and 14 deletions

View File

@@ -85,9 +85,9 @@ Try changing the value of the action in the form `http://127.0.0.1:9090/login` t
![](images/4.1.slice.png?raw=true)
Figure 4.2 Server prints request data
Figure 4.2 Server prints request data
The type of `request.Form` is `url.Value`. It saves data with the format `key=value`.
The type of `request.Form` is `url.Values`. It saves data with the format `key=value`.
```Go
v := url.Values{}
v.Set("name", "Ava")