Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3149

Make ReadFieldN methods in generated Go code private

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.2
    • Fix Version/s: 0.9.3
    • Component/s: Go - Compiler
    • Labels:
      None

      Description

      The go thrift compiler generates ReadFieldN and writeFieldN methods for every field of a struct. E.g.:

      func (p *Statistics) ReadField1(iprot thrift.TProtocol) error {
      ...
      }
      
      func (p *Statistics) writeField1(oprot thrift.TProtocol) (err error) {
      ...
      }
      

      ReadField1, ReadField2, etc are not very descriptive names and shouldn't be part of public API of a generated package (like writeFieldN).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                k.shaposhnikov@gmail.com Konstantin Shaposhnikov
                Reporter:
                k.shaposhnikov@gmail.com Konstantin Shaposhnikov
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: