Add review changes
This commit is contained in:
@@ -25,18 +25,18 @@ func Start() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var ch = Packets
|
||||
var inputPackets = Packets
|
||||
if packetMetricsDestination != "" {
|
||||
go metrics.writeMetrics()
|
||||
ch = make(chan packet.Packet)
|
||||
inputPackets = make(chan packet.Packet)
|
||||
go func() {
|
||||
for p := range ch {
|
||||
for p := range inputPackets {
|
||||
Packets <- tracePacket(p)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
return start(ch)
|
||||
return start(inputPackets)
|
||||
}
|
||||
|
||||
// Stop starts the interception.
|
||||
|
||||
@@ -18,7 +18,7 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
flag.StringVar(&packetMetricsDestination, "packet-metrics", "", "Write packet metrics")
|
||||
flag.StringVar(&packetMetricsDestination, "write-packet-metrics", "", "Write packet metrics to the specified file")
|
||||
}
|
||||
|
||||
type (
|
||||
|
||||
Reference in New Issue
Block a user