nil except
This commit is contained in:
parent
69d53f9d4d
commit
c3e6f04dd8
@ -47,9 +47,11 @@ func (m *MongoDB) Init(collections []string, config MongoConf) {
|
|||||||
m.Logger.Info().Msg("Connecting to" + config.GetUrl())
|
m.Logger.Info().Msg("Connecting to" + config.GetUrl())
|
||||||
mngoCollections = collections
|
mngoCollections = collections
|
||||||
mngoConfig = config
|
mngoConfig = config
|
||||||
err := m.createClient(config.GetUrl())
|
if err := m.createClient(config.GetUrl()); err != nil {
|
||||||
m.Logger.Error().Msg(err.Error())
|
m.Logger.Error().Msg(err.Error())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *MongoDB) createClient(MongoURL string) error {
|
func (m *MongoDB) createClient(MongoURL string) error {
|
||||||
var err error
|
var err error
|
||||||
// Allows us to use marshal and unmarshall with results of FindOne() and others
|
// Allows us to use marshal and unmarshall with results of FindOne() and others
|
||||||
|
Loading…
Reference in New Issue
Block a user