使用mgo错误插入ISODate字段

I'm really new in using go, mgo and gin gonic ...I've been creating a mini app and I have a problem inserting a new register into mongoDB using mgo. My error says:

"PANIC: error parsing element 0 of field documents :: caused by :: wrong type for '0' field, expected object, found 0: [ { date: new Date(1441051152939), from: "11", to: "12", office: "2", client_id: "1368465545" } ]_"

My struct is the next one:

type Reservation struct {
      ID        bson.ObjectId `bson:"_id,omitempty" json:"_id"`
      Date      time.Time     `bson:"date" json:"date"`
      From      string        `bson:"from" json:"from"`
      To        string        `json:"to"`
      Office     string       `json:"office"`
      Client_id string        `json:"client_id"` }

And I'm trying to insert it as follows using gin-gonic and mgo:

    func addReservation(c *gin.Context) {

          x := session.DB("projXXXX").C("reservation")
          var reservations []Reservation
          c.Bind(&reservations)>             
          err := x.Insert(&reservations)
          if err != nil {
                panic(err)
          }
          c.String(200,"whatever")  
}

My collection in mongoDB is like this:

{
    "_id" : ObjectId("55ba2e611cb87b9a6d75e94b"),
    "date" : ISODate("2015-10-22T00:00:00.000Z"),
    "from" : "9",
    "to" : "10",
    "office" : "4",
    "client_id" : "1123456469797"
}

Thanks a lot for your help

From the look of the error, MongoDB is seeing an array where it expects to see a single object. It looks like the problem is that you're trying to insert the []Reservation slice as a single object.

Rather than taking a slice of objects to insert, Collection.Insert takes each object to insert as a separate argument. You probably want to use the special ... syntax for calling a variadic function:

err := x.Insert(reservations...)