(resp *plugin.CodeGeneratorResponse)
| 148 | } |
| 149 | |
| 150 | func Write(resp *plugin.CodeGeneratorResponse) { |
| 151 | g := generator.New() |
| 152 | // Send back the results. |
| 153 | data, err := proto.Marshal(resp) |
| 154 | if err != nil { |
| 155 | g.Error(err, "failed to marshal output proto") |
| 156 | } |
| 157 | _, err = os.Stdout.Write(data) |
| 158 | if err != nil { |
| 159 | g.Error(err, "failed to write output proto") |
| 160 | } |
| 161 | } |