Closed orange-jacky closed 5 years ago
This is working as expected. This is the vet test "composites", documented as "check for unkeyed composite literals". I'm going to close this bug since this is what is supposed to happen. Please comment if I have misunderstood.
Please answer these questions before submitting your issue. Thanks!
What did you do?
i use package "go.mongodb.org/mongo-driver/bson"
.... filter := bson.D{{"sp.inserttime", bson.D{{"$gte", int64(timestamp)}}}} ctx := context.Background() cur, err := collection.Find(ctx, filter) ....
go build my code, it success
meanwhile, go vet it, an it failed
What did you expect to see?
go vet ok
What did you see instead?
go.mongodb.org/mongo-driver/bson/primitive.E composite literal uses unkeyed fields
System details