Skip to content

Commit 941b5bc

Browse files
generatedunixname896326506490493meta-codesync[bot]
authored andcommitted
Fix modernize issues in fbcode/time/cmd/ptpcheck/checker
Reviewed By: leoleovich Differential Revision: D101764907 fbshipit-source-id: b99626945088f8cfb17e98b3a7d96c21be6724d7
1 parent 0647e51 commit 941b5bc

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎cmd/ptpcheck/checker/sptp.go‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ limitations under the License.
1717
package checker
1818

1919
import (
20+
"maps"
21+
2022
"github.com/facebook/time/ptp/sptp/stats"
2123

2224
log "github.com/sirupsen/logrus"
@@ -59,12 +61,8 @@ func RunSPTP(address string) (*PTPCheckResult, error) {
5961
if err != nil {
6062
log.Warningf("couldn't get SPTP counters: %v", err)
6163
} else {
62-
for k, v := range tx {
63-
result.PortStatsTX[k] = v
64-
}
65-
for k, v := range rx {
66-
result.PortStatsRX[k] = v
67-
}
64+
maps.Copy(result.PortStatsTX, tx)
65+
maps.Copy(result.PortStatsRX, rx)
6866
}
6967

7068
return result, nil

0 commit comments

Comments
 (0)