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

Refactor URI parsing to use pointers

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • None
    • 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?

      New Description: The URI parser uses two variables per option: one for the value and one for determining if the option is set. This code that uses the parser is inconsistent. Sometimes, it checks the *Set variant but for some boolean options that are only useful if set to true (e.g. SSL), it will directly check cs.SSL rather than cs.SSLSet && cs.SSL. Let's refactor this to use pointers like the rest of our options code for consistency.

       

      Previous Description: Pretty minor, but ConnString.SSLSet is never read by anything. I believe https://github.com/mongodb/mongo-go-driver/blob/a96725e2d7cb39d0c31f7f6605305ad3f92787c1/x/mongo/driver/topology/topology_options.go#L112 should actually be "if cs.SSLSet && cs.SSL {".

            Assignee:
            Unassigned Unassigned
            Reporter:
            bartle David Bartley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: