Update 04.2.md
go langue do not has a structure like for ... in ...
This commit is contained in:
@@ -97,7 +97,7 @@
|
|||||||
slice:=[]string{"apple","pear","banane"}
|
slice:=[]string{"apple","pear","banane"}
|
||||||
|
|
||||||
v := r.Form.Get("fruit")
|
v := r.Form.Get("fruit")
|
||||||
for item in slice {
|
for _, item range slice {
|
||||||
if item == v {
|
if item == v {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user