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

Set Parameters Have Wrong Key Type in Go Code

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.3
    • 0.10.0
    • Go - Compiler
    • Go 1.4.2
      Thrift 0.9.3
      Ubuntu Linux 14.04
      amd64

    Description

      When Thrift 0.9.3 generates Go code for a service with a parameter that is of type set<typedeffed thing>, the generated Go code parameter is of type map[untypedeffed thing]bool. For example:

      Thrift

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

      Go

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

      The key type of the Go map should be Foo, not string.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tom.deering Tom Deering
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: