[ 
https://issues.apache.org/jira/browse/THRIFT-3467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15228371#comment-15228371
 ] 

artem antonenko commented on THRIFT-3467:
-----------------------------------------

"FYI, in an initializer, one can use {} as shorthand for struct{}{}. That will 
help make your code snippet look less bad"
Good catch, done

> Go Maps for Thrift Sets Should Have Values of Type struct{} 
> ------------------------------------------------------------
>
>                 Key: THRIFT-3467
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3467
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Go - Compiler
>    Affects Versions: 0.9.3
>            Reporter: Tom Deering
>            Assignee: artem antonenko
>              Labels: golang
>
> Sets in Thrift are currently turned into maps with boolean values in Go. 
> Example:
> Thrift
> {code}
> namespace go bug
> service FooService{
>       void bar (1:set<string> foos)
> }
> {code}
> Go
> {code}
> func (p *FooServiceClient) Bar(foos map[string]bool) (err error) 
> {code}
> Boolean map values waste memory. Map values should be of the zero-byte 
> struct{} type.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to