How to write a wrapper function for FindOptions in go mongo-driver

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Works as Designed
    • Priority: Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I want to write a wrapper function for FindOptions in my dbobject code so that I can avoid importing package options in my service code . Basically i'm trying to accomodate three func under one interface

      SetSkip() 
      SetLimit()
      SetSort() 

      Also I want to know the usage of MergeFindOptions

      func MergeFindOptions(opts ...*FindOptions) *FindOptions 

      Any examples will be of great help.

            Assignee:
            Matt Dale
            Reporter:
            karthick d
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: