2022-08-22 01:36:13 +00:00
|
|
|
package main
|
|
|
|
|
2022-08-27 13:21:05 +00:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"github/fthvgb1/wp-go/db"
|
|
|
|
"github/fthvgb1/wp-go/models"
|
|
|
|
"github/fthvgb1/wp-go/vars"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
err := vars.InitDbConfig()
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
err = db.InitDb()
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
2022-08-22 01:36:13 +00:00
|
|
|
|
|
|
|
func main() {
|
2022-08-27 13:21:05 +00:00
|
|
|
T, err := models.WpPostsM.FindOneById(3)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
fmt.Println(T)
|
2022-08-22 01:36:13 +00:00
|
|
|
}
|