From dd045a3767636338fa7ba449d791095aa0fc7a1c Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Wed, 5 Oct 2022 19:40:49 -0700 Subject: [PATCH] net/flowtrack: add json tags to Tuple (#5849) By convention, JSON serialization uses camelCase. Specify such names on the Tuple type. Signed-off-by: Joe Tsai --- net/flowtrack/flowtrack.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/flowtrack/flowtrack.go b/net/flowtrack/flowtrack.go index 9fcf62618..9e96a42be 100644 --- a/net/flowtrack/flowtrack.go +++ b/net/flowtrack/flowtrack.go @@ -20,9 +20,9 @@ import ( // Tuple is a 5-tuple of proto, source and destination IP and port. type Tuple struct { - Proto ipproto.Proto - Src netip.AddrPort - Dst netip.AddrPort + Proto ipproto.Proto `json:"proto"` + Src netip.AddrPort `json:"src"` + Dst netip.AddrPort `json:"dst"` } func (t Tuple) String() string {