4 / 4
Jan 23

Hi,

I was looking into the Go Driver 2.0 migration. It seems to me that “options.ArrayFilters” is gone and the documentation outdated. Picking up on the example and official documentation:

opts := options.FindOneAndUpdate(). SetArrayFilters(options.ArrayFilters{Filters: identifier}). SetReturnDocument(options.After)

I am unable to find ‘options.ArrayFilters’ in the 2.0 release. The ArrayFilters struct is in the 1.17 release:

but not in the 2.0 release anymore:

Best regards,
Timo

In your example, you can pass the filter in directly now:

opts := options.FindOneAndUpdate(). SetArrayFilters(identifier). SetReturnDocument(options.After)