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

Unified Diff: logdog/common/types/streamaddr.go

Issue 2899993002: [logdog/common/types] custom JSON encoding to allow streamaddr to be zero. (Closed)
Patch Set: use omitempty, duh! Created 3 years, 7 months 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 | « no previous file | logdog/common/types/streamaddr_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/common/types/streamaddr.go
diff --git a/logdog/common/types/streamaddr.go b/logdog/common/types/streamaddr.go
index f952ff1bd4ffbaf419c2421935561cef70cc1a44..2dca9dcf9168b77f3d30b60559d5f7b4cb1973d3 100644
--- a/logdog/common/types/streamaddr.go
+++ b/logdog/common/types/streamaddr.go
@@ -18,13 +18,13 @@ const logDogURLScheme = "logdog"
// StreamAddr is a fully-qualified LogDog stream address.
type StreamAddr struct {
// Host is the LogDog host.
- Host string
+ Host string `json:"host,omitempty"`
// Project is the LUCI project name that this log belongs to.
- Project cfgtypes.ProjectName
+ Project cfgtypes.ProjectName `json:"project,omitempty"`
// Path is the LogDog stream path.
- Path StreamPath
+ Path StreamPath `json:"path,omitempty"`
}
var _ flag.Value = (*StreamAddr)(nil)
« no previous file with comments | « no previous file | logdog/common/types/streamaddr_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698