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

Go Maps for Thrift Sets Should Have Values of Type struct{}

    XMLWordPrintableJSON

    Details

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

      Description

      Sets in Thrift are currently turned into maps with boolean values in Go. Example:

      Thrift

      namespace go bug
      service FooService{
      	void bar (1:set<string> foos)
      }
      

      Go

      func (p *FooServiceClient) Bar(foos map[string]bool) (err error) 
      

      Boolean map values waste memory. Map values should be of the zero-byte struct{} type.

        Attachments

          Activity

            People

            • Assignee:
              creker artem antonenko
              Reporter:
              tom.deering Tom Deering
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: