这个方式更好

这个方式更好
This commit is contained in:
iamybj
2016-10-19 11:24:08 +08:00
committed by GitHub
parent 75fe66d989
commit 9f5da651db

View File

@@ -86,12 +86,14 @@
那么我们可以这样来验证
slice:=[]string{"apple","pear","banane"}
for _, v := range slice {
if v == r.Form.Get("fruit") {
v := r.Form.Get("fruit")
for item in slice {
if item == v {
return true
}
}
return false
## 单选按钮