Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-3327

Move option docs from struct fields to setter methods

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.0.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Go Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Context

      Currently, most of the detailed information about what options do is only on the *Options structs. However, in v2, we expect most people to only use the options setter methods, which mostly just reference the *Options struct fields for full documentation. We should move or copy all documentation from the *Options struct fields to the setter methods.

      Definition of done

      • Move all option documentation from the *Options struct field to the corresponding setter method.
      • (Optional) Consider keeping either a full copy of the entire documentation on the struct field, or adding a reference to the relevant setter for each *Options struct field, which allows users to make sense of the struct fields if necessary.
        • The downside to keeping an entire copy in both places is that it's hard to maintain, introducing the opportunity for stale and out-of-sync documentation that confuses users.

      Pitfalls

            Assignee:
            joy.wang@mongodb.com Joy Wang
            Reporter:
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: