| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package main | 5 package main |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "flag" | 8 "flag" |
| 9 "fmt" | 9 "fmt" |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 fs.Var(&s.Type, "type", | 32 fs.Var(&s.Type, "type", |
| 33 fmt.Sprintf("Input stream type. Choices are: %s", | 33 fmt.Sprintf("Input stream type. Choices are: %s", |
| 34 streamproto.StreamTypeFlagEnum.Choices())) | 34 streamproto.StreamTypeFlagEnum.Choices())) |
| 35 fs.Var(&s.Tee, "tee", | 35 fs.Var(&s.Tee, "tee", |
| 36 fmt.Sprintf("Tee the stream through the Butler's output. Options
are: %s", | 36 fmt.Sprintf("Tee the stream through the Butler's output. Options
are: %s", |
| 37 streamproto.TeeTypeFlagEnum.Choices())) | 37 streamproto.TeeTypeFlagEnum.Choices())) |
| 38 fs.Var(&s.Tags, "tag", "Add a key=value tag.") | 38 fs.Var(&s.Tags, "tag", "Add a key=value tag.") |
| 39 } | 39 } |
| 40 | 40 |
| 41 // Converts command-line parameters into a stream.Config. | 41 // Converts command-line parameters into a stream.Config. |
| 42 func (s streamConfig) properties() streamproto.Properties { | 42 func (s streamConfig) properties() *streamproto.Properties { |
| 43 if s.ContentType == "" { | 43 if s.ContentType == "" { |
| 44 // Choose content type based on format. | 44 // Choose content type based on format. |
| 45 s.ContentType = string(s.Type.DefaultContentType()) | 45 s.ContentType = string(s.Type.DefaultContentType()) |
| 46 } | 46 } |
| 47 » return *s.Properties() | 47 » return s.Properties() |
| 48 } | 48 } |
| OLD | NEW |