diff --git a/generator/go.go b/generator/go.go index 8a863c0..7886c5d 100644 --- a/generator/go.go +++ b/generator/go.go @@ -180,7 +180,7 @@ func (g *GoGenerator) formatType(pkg string, thrift *parser.Thrift, typ *parser. valueType := g.formatKeyType(pkg, thrift, typ.ValueType) return "map[" + valueType + "]struct{}" case "list": - return "[]" + g.formatType(pkg, thrift, typ.ValueType, 0) + return "[]" + g.formatType(pkg, thrift, typ.ValueType, toNoPointer) case "map": keyType := g.formatKeyType(pkg, thrift, typ.KeyType) return "map[" + keyType + "]" + g.formatType(pkg, thrift, typ.ValueType, toNoPointer) diff --git a/generator/main.go b/generator/main.go index 7197270..bfd7723 100644 --- a/generator/main.go +++ b/generator/main.go @@ -89,6 +89,7 @@ func main() { generator := &GoGenerator{ ThriftFiles: parsedThrift, Format: true, + Pointers: *flagGoPointers, } err = generator.Generate(outpath) if err != nil {