mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 02:42:48 +00:00
Started working on MGO
This commit is contained in:
15
main.go
15
main.go
@@ -1,16 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
//"fmt"
|
||||
"fmt"
|
||||
//"github.com/julienschmidt/httprouter"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/mgerb42/mywebsite/model"
|
||||
"github.com/mgerb42/mywebsite/route"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
log.Fatal(http.ListenAndServe(":8080", route.Routes()))
|
||||
s := model.NewSession()
|
||||
|
||||
s.TestStore("Mit", "G")
|
||||
|
||||
var p []model.Person
|
||||
|
||||
p = s.SearchName("Mit")
|
||||
|
||||
fmt.Println("Query: ")
|
||||
fmt.Println(p[0].LastName)
|
||||
|
||||
log.Fatal(http.ListenAndServe(":8080", route.Routes()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user