omitempty

This commit is contained in:
Peter Bourgon
2015-09-08 11:41:19 +02:00
parent 474525bcd6
commit b143946db6

View File

@@ -76,10 +76,10 @@ func (n Nodes) Merge(other Nodes) Nodes {
// given node in a given topology, along with the edges emanating from the
// node and metadata about those edges.
type Node struct {
Metadata `json:"metadata"`
Counters `json:"counters"`
Metadata `json:"metadata,omitempty"`
Counters `json:"counters,omitempty"`
Adjacency IDList `json:"adjacency"`
Edges EdgeMetadatas `json:"edges"`
Edges EdgeMetadatas `json:"edges,omitempty"`
}
// MakeNode creates a new Node with no initial metadata.