|
package handler
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"myschools.me/suguo/gofound/service"
|
|
)
|
|
|
|
// WordCut 分词
|
|
func WordCut(c *gin.Context) {
|
|
q := c.Query("q")
|
|
if q == "" {
|
|
ResponseErrorWithMsg(c, "请输入关键字")
|
|
return
|
|
}
|
|
r := service.WordCut(q)
|
|
ResponseSuccessWithData(c, r)
|
|
}
|