mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-28 03:52:35 +00:00
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 <joetsai@digital-static.net>
This commit is contained in:
parent
a73c423c8a
commit
dd045a3767
@ -20,9 +20,9 @@ import (
|
|||||||
|
|
||||||
// Tuple is a 5-tuple of proto, source and destination IP and port.
|
// Tuple is a 5-tuple of proto, source and destination IP and port.
|
||||||
type Tuple struct {
|
type Tuple struct {
|
||||||
Proto ipproto.Proto
|
Proto ipproto.Proto `json:"proto"`
|
||||||
Src netip.AddrPort
|
Src netip.AddrPort `json:"src"`
|
||||||
Dst netip.AddrPort
|
Dst netip.AddrPort `json:"dst"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t Tuple) String() string {
|
func (t Tuple) String() string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user