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

Custom tags remove db and json tags

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.13.0
    • 0.14.0
    • Go - Compiler
    • None

    Description

      Given the IDL:

      struct Example {
        1: bool withTag (go.tag = "foo:\"bar\"")
        2: bool withoutTag
      }
      

      The generated code looks like:

      type Example struct {
        WithTag bool `thrift:"withTag,1", foo:"bar"`
        WithoutTag bool `thrift:"withoutTag,2" db:"withoutTag" json:"withoutTag"`
      }
      

      The bug is on this line of the Go generator where any custom tag overwrites the existing db and json tags.

      Custom tags that aren't overrides should be appended instead of replacing the whole thing.

      Attachments

        Issue Links

          Activity

            People

              dcelasun Duru Can Celasun
              dcelasun Duru Can Celasun
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m