How can i do a bit operator mongodb in key value structure in golang?

Viewed 16

How can i use bit operator, "or" with the value "otsKeyIndex" in a key value structure like this below?

update := bson.D{
                {
                    Key: "$bit",
                    Value: bson.D{
                        {Key: "bitfield", Value: {or: otsKeyIndex}},
                    },
                },
            }
missing type in composite literal
0 Answers
Related