Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-57771

[CBBS] Prefix common constants

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Minor
    • backlog
    • master
    • tools
    • None
    • 0

    Description

      What's the issue?
      The way we name constants in cbbs isn't as clear as they could be, for example.

      const (
      	EnvironmentKMSAuthType KMSAuthType = iota
      	FileKMSAuthType 
      	IDAndKeyKMSAuthType
      )
      

      const (
              KMSAuthTypeEnvironment KMSAuthType = iota
              KMSAuthTypeFile
              KMSAuthTypeIDAndKey
      )
      

      This naming method means:

      1. We prefix the constant with the type (rather than postfix/omission)
      2. Text editor suggestions should be saner
      3. It's clear which constants are related/grouped at a glance

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            owend Daniel Owen
            james.lee James Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty