astaxie / build-web-application-with-golang

A golang ebook intro how to build a web with golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

04.2.md中复选框部分调用beeku中的Slice_diff报错

ohano opened this issue · comments

commented

`slice:=[]string{"football","basketball","tennis"}
a:=Slice_diff(r.Form["interest"],slice)
if a == nil{
return true
}

return false`

Slice_diff中接收的参数类型是[]interface{},而r.Form["interest"]的类型为[]string,编译时会报错