func InsertUser(user model.User) (ret model.User, err error) { s := mongo.GetSession() defer s.Close() c := collection(s, util.MONGO_COLLECTION_USER) user.Uid = bson.NewObjectId() user.Ctime = util.UnixMillSeconds() return user, c.Insert(user) }