有两种方式:
1、用字符串拼接
value := "阳光"
value = "'%"+value+"%'"
query = "select uid from info where tags like ?
err := mysqlutil.GetInstance().Query(context.Background(), next, query,value)
2、用mysql内置的字符串连接函数concat()
value := "阳光"
query = "select uid from info where tags like concat('%',?,'%')
err := mysqlutil.GetInstance().Query(context.Background(), next, query,value)