Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: logdog/client/butler/butler.go

Issue 2601583002: Butler: fix global tags applied to empty map. (Closed)
Patch Set: Added tests, testing method to Bundler. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « logdog/client/butler/bundler/stream.go ('k') | logdog/client/butler/butler_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/client/butler/butler.go
diff --git a/logdog/client/butler/butler.go b/logdog/client/butler/butler.go
index f8a1d134fcd77ffbb5410fb03018a9b478255ef7..6b16e3c3d93b3080ebd47d3f819bd3fbd215a5a6 100644
--- a/logdog/client/butler/butler.go
+++ b/logdog/client/butler/butler.go
@@ -406,6 +406,10 @@ func (b *Butler) AddStream(rc io.ReadCloser, p *streamproto.Properties) error {
// Build per-stream tag map.
if l := len(b.c.GlobalTags); l > 0 {
+ if p.Tags == nil {
+ p.Tags = make(map[string]string, l)
+ }
+
for k, v := range b.c.GlobalTags {
// Add only global flags that aren't already present (overridden) in
// stream tags.
« no previous file with comments | « logdog/client/butler/bundler/stream.go ('k') | logdog/client/butler/butler_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698