You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 rivejä
302 B
19 rivejä
302 B
package controllers
|
|
|
|
import (
|
|
"github.com/astaxie/beego"
|
|
"fmt"
|
|
"beeblog/service"
|
|
)
|
|
|
|
type IndexController struct {
|
|
beego.Controller
|
|
}
|
|
|
|
func (c *IndexController) Get() {
|
|
blogs,_ := service.FindBlogs()
|
|
fmt.Println(blogs)
|
|
c.Data["Blogs"] = blogs
|
|
c.Data["IsHome"] = true
|
|
c.TplName = "index.html"
|
|
}
|
|
|