Update 04.2.md

go langue do not has a structure like for ... in ...
This commit is contained in:
Shuai Qi
2017-04-08 14:37:13 +08:00
committed by GitHub
parent 6a18018915
commit aa24451f8f

View File

@@ -97,7 +97,7 @@
slice:=[]string{"apple","pear","banane"}
v := r.Form.Get("fruit")
for item in slice {
for _, item range slice {
if item == v {
return true
}