jgraham909 / revmgo Goto Github PK
View Code? Open in Web Editor NEWmgo module for revel framework
License: MIT License
mgo module for revel framework
License: MIT License
Hello
This causes conflict when you use revmgo along with revel's db module as that is also using the "db.spec" parameter. Please see line 29 of
https://github.com/robfig/revel/blob/master/modules/db/app/db.go
Thanks
-Rv
revmgo seems to be a good idea but it also seems abandoned. Is anybody maintaining the code?
Please mention that "revmgo.ControllerInit" has to be called in Controller's init method.
It costs me half an hour to figure this out and make revmgo works.
Hi, I use revel and mgo with revmgo to build a restful service.I think you did a good job!
It works fine for a single mongod instance, but when I connected my app to a replica set, the app can only read from the primary node.Here is what I had tried.
revmgo.dial = mongodb://172.0.15.22:27017, 172.20.135.23:27017, 172.20.135.24:27017
c.MongoSession.SetMode(mgo.Eventual, true)"
to change mode in my controllerthen I can only see the operation in primary node,and none in the secondary.
I also tried to example in https://labix.org/mgo. It works well, and I can see operation in both primary and secondary node.And then I use pure mgo in revel, it goes the situation like revmgo.
Could you give me a hand with this issue?
:-)
On startup revel, nil pointer error occurred like below:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x1b3436]
goroutine 1 [running]:
runtime.panic(0x418ce0, 0x9956b9)
/Users/myhome/.gvm/gos/go1.2/src/pkg/runtime/panic.c:266 +0xb6
github.com/revel/revel.(_MergedConfig).String(0x0, 0x4df490, 0xb, 0x0, 0x0, ...)
/Users/myhome/.gvm/pkgsets/go1.2/global/src/github.com/revel/revel/config.go:89 +0x36
github.com/revel/revel.(_MergedConfig).StringDefault(0x0, 0x4df490, 0xb, 0x4d9a30, 0x9, ...)
/Users/myhome/.gvm/pkgsets/go1.2/global/src/github.com/revel/revel/config.go:97 +0xa8
github.com/jgraham909/revmgo.AppInit()
/Users/myhome/.gvm/pkgsets/go1.2/global/src/github.com/jgraham909/revmgo/revmgo.go:39 +0x55
github.com/robfig/revel.runStartupHooks()
/Users/myhome/.gvm/pkgsets/go1.2/global/src/github.com/robfig/revel/server.go:119 +0x5e
github.com/robfig/revel.Run(0xde2d)
/Users/myhome/.gvm/pkgsets/go1.2/global/src/github.com/robfig/revel/server.go:93 +0x4ad
main.main()
/Users/myhome/.gvm/pkgsets/go1.2/global/src/myapp/app/tmp/main.go:109 +0xe05
The error is thrown in the line revel.Config.StringDefault("revmgo.dial", "localhost").
But my code below works well:
code in init.go
func testInit() {
fmt.Println(revel.Config.StringDefault("revmgo.dial", "localhost"))
}
func init() {
....
revel.OnAppStart(testInit)
}
Do you have any ideas?
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.