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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.3
    • 0.10.0
    • Go - Compiler

    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

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

            Dates

              Created:
              Updated:
              Resolved: