Skip to content

Commit 8450c8e

Browse files
committed
chore: add comment
1 parent 36dc797 commit 8450c8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/tcpip/tcpip.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,10 +1634,12 @@ func (s *StatCounter) String() string {
16341634
return strconv.FormatUint(s.Value(), 10)
16351635
}
16361636

1637+
// MarshalJSON implements json.Marshaler.MarshalJSON
16371638
func (s *StatCounter) MarshalJSON() ([]byte, error) {
16381639
return json.Marshal(s.Value())
16391640
}
16401641

1642+
// UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON
16411643
func (s *StatCounter) UnmarshalJSON(data []byte) error {
16421644
var val uint64
16431645
if err := json.Unmarshal(data, &val); err != nil {

0 commit comments

Comments
 (0)