| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package butlerproto | 5 package butlerproto |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "bytes" | 8 "bytes" |
| 9 "compress/zlib" | 9 "compress/zlib" |
| 10 "errors" | 10 "errors" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 // WriteWith writes a ButlerLogBundle to the supplied recordio.Writer. | 239 // WriteWith writes a ButlerLogBundle to the supplied recordio.Writer. |
| 240 func (w *Writer) WriteWith(fw recordio.Writer, b *protocol.ButlerLogBundle) erro
r { | 240 func (w *Writer) WriteWith(fw recordio.Writer, b *protocol.ButlerLogBundle) erro
r { |
| 241 data, err := proto.Marshal(b) | 241 data, err := proto.Marshal(b) |
| 242 if err != nil { | 242 if err != nil { |
| 243 return fmt.Errorf("butlerproto: failed to marshal Bundle: %s", b
) | 243 return fmt.Errorf("butlerproto: failed to marshal Bundle: %s", b
) |
| 244 } | 244 } |
| 245 | 245 |
| 246 return w.writeData(fw, protocol.ButlerMetadata_ButlerLogBundle, data) | 246 return w.writeData(fw, protocol.ButlerMetadata_ButlerLogBundle, data) |
| 247 } | 247 } |
| OLD | NEW |