/app/domain/book_finders.go
http://github.com/sut-go/gon · Go · 22 lines · 13 code · 4 blank · 5 comment · 1 complexity · 7848567234533565925e31f65956554a MD5 · raw file
- /**
- This should be an auto-generated file
- similar to those in the ROO framework.
- **/
- package book
- import "launchpad.net/gobson/bson"
- import "launchpad.net/mgo"
- type BookService struct {
- *mgo.Session
- // EntityManager
- }
- func (b *BookService) Get(id string) (result *Book) {
- c := b.DB("gon").C("book")
- defer b.Close()
- result = new(Book)
- _ = c.Find(bson.M{"_id": id}).One(result)
- return
- }