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

Constants for operators

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: API
    • None
    • Fully Compatible

      Would it be possible to define constants for the mongo operators somewhere in the library? e.g.

      const (
        Set = "$set"
        Unset = "$unset"
        CurrentDate = "$currentDate"
        .....
      )

       

      We recently started using sonarqube and it rightly so complains about duplicating strings in the code more than x times.

       

      We maintain an internal set of libraries where we could also consider adding these but I would assume more people would benefit from having these into the core library.

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            b.wilsonhunt@faceit.com Bradley Wilson-Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: