Skip to content

Commit

Permalink
refactor: apply betteralign recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
clambin committed Aug 25, 2024
1 parent d19d8fd commit 0e66ee9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pkg/ping/icmp/icmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,10 @@ func id() int {
var _ slog.LogValuer = Response{}

type Response struct {
From net.IP
Received time.Time
MsgType icmp.Type
Body icmp.MessageBody
Received time.Time
From net.IP
}

func (r Response) SequenceNumber() SequenceNumber {
Expand All @@ -260,8 +260,8 @@ func (r Response) LogValue() slog.Value {
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

type responseQueue struct {
queue []Response
notEmpty sync.Cond
queue []Response
lock sync.Mutex
}

Expand Down
10 changes: 5 additions & 5 deletions pkg/ping/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
)

type Target struct {
net.IP
sent int
received int
latencies time.Duration
outstandingPackets map[icmp.SequenceNumber]time.Time
lock sync.RWMutex
net.IP
sent int
received int
latencies time.Duration
lock sync.RWMutex
}

func (t *Target) Sent(seq icmp.SequenceNumber) {
Expand Down

0 comments on commit 0e66ee9

Please sign in to comment.