Incorrect example in godoc website

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • 0.3.0
    • Affects Version/s: No Release
    • Component/s: Documentation
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The `mongo.Pipeline{}` example in this link, https://godoc.org/github.com/mongodb/mongo-go-driver/mongo#Pipeline, is incorrect.

      mongo.Pipeline{{
      	{"$group", bson.D{{"_id", "$state"}, {"totalPop", bson.D{"$sum", "$pop"}}}},
      	{"$match": bson.D{{"totalPop", bson.D{"$gte", 10*1000*1000}}}},
      }}
      

      It should be as follows:

      mongo.Pipeline{{
      	{{"$group", bson.D{{"_id", "$state"}, {"totalPop", bson.D{{"$sum", "$pop"}}}}}},
      	{{"$match", bson.D{{"totalPop", bson.D{{"$gte", 10 * 1000 * 1000}}}}}},
      }}
      

              Assignee:
              Isabella Siu (Inactive)
              Reporter:
              Ken Chen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: