1
0
Fork 0
mirror of https://github.com/vbatts/imgsrv.git synced 2024-12-24 23:06:31 +00:00

removing unused init

This commit is contained in:
Vincent Batts 2013-10-03 23:51:00 -04:00
parent 9b2c342375
commit 70072f7a59

View file

@ -42,6 +42,7 @@ func runServer(c *config.Config) {
Pass: serverConfig.MongoPassword,
DbName: serverConfig.MongoDbName,
}
err := du.Init()
if err != nil {
log.Fatal(err)
@ -68,21 +69,6 @@ func runServer(c *config.Config) {
log.Fatal(http.ListenAndServe(addr, nil))
}
func initMongo() {
mongo_session, err := mgo.Dial(serverConfig.MongoHost)
if err != nil {
log.Panic(err)
}
images_db = mongo_session.DB(serverConfig.MongoDbName)
if len(serverConfig.MongoUsername) > 0 && len(serverConfig.MongoPassword) > 0 {
err = images_db.Login(serverConfig.MongoUsername, serverConfig.MongoPassword)
if err != nil {
log.Panic(err)
}
}
du.Gfs = images_db.GridFS("fs")
}
func serverErr(w http.ResponseWriter, r *http.Request, e error) {
httplog.LogRequest(r, 503)
log.Printf("Error: %s", e)