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

Remove code duplication from description.NewServer and IsMaster.Result

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.0
    • Affects Version/s: None
    • Component/s: Core API
    • Labels:
      None

      The description.NewServer function currently takes a result.IsMaster, but that adds an extra step of decoding indirection. Instead, take the code from operation.Result and use it to update the description.NewServer method.

      The description.NewServer function is only being used in the SDAM spec tests and operation.IsMaster.Result duplicates the code to create a new server description. We should change this so IsMaster.Result uses this function and remove the duplication.

       

            Assignee:
            isabella.siu@mongodb.com Isabella Siu (Inactive)
            Reporter:
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: