Closed k0fi closed 8 years ago
Could you be more specific is what you are looking for? If you are using Mongo, you can look at this file to see an example of how to interact with the database for a Create and Read operation. https://github.com/josephspurrier/gowebapp/blob/master/model/mongo/user.go (This is file not actually used in the Controllers, but is there just for reference. The actual code that is referenced in the Controllers is this file (it's so you can easily swap out the database): https://github.com/josephspurrier/gowebapp/blob/master/model/user.go
The documentation for Remove is here: https://godoc.org/gopkg.in/mgo.v2#Collection.Remove The documentation for Update is here: https://godoc.org/gopkg.in/mgo.v2#Collection.Update
Well, I know that the User model is a pretty good example but I'm a person who is very knew to go and learns by examples. At the moment the go docs looks mostly gibberish to me. What I need is a kind of simple blog app, upon which I can develop more sophisticated apps.
Ah, I see what you are looking for. That would be a good thing to add to the app. I like the idea of a little notepad functionality to Create, Read, Update, and Delete notes. I won't be able to work on it until the first week in May though.
Alright I appreciate if you can add a notepad sample app at your convenience.
+1 : I'd be really interested in seeing this as well 👍
The code is great by the way, learning a lot from it, thanks for sharing this, really appreciate it.
The notepad functionality was added. Let me know if you have any issues!.
Excellent! I tested with mongodb ans saw no issues so far. Many thanks for swift creation of the CRUD.
Hi,
I just tested with the default boltdb - it works - Brilliant example :-) Thanks very much, this is great.
Regards, John
Wonderful! Thanks for the feedback guys!
Hello Joseph,
I'm having difficulty to add a crud to the MVC. That would be great if you could add a sample post crud example. Thanks