Skip to content

Commit 58138f3

Browse files
committed
fix linter issues
1 parent 1865969 commit 58138f3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

platform/os_linux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"go.uber.org/zap"
1818
)
1919

20-
var logger = zaplog.CNILogger.With(zap.String("component", "platform"))
20+
var logger = zaplog.CNILogger.With(zap.String("component", "platform-linux"))
2121

2222
const (
2323
// CNMRuntimePath is the path where CNM state files are stored.

platform/os_windows.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"syscall"
1414
"time"
1515

16+
zaplog "github.com/Azure/azure-container-networking/cni/log"
1617
"github.com/Azure/azure-container-networking/log"
1718
"github.com/Azure/azure-container-networking/platform/windows/adapter"
1819
"github.com/Azure/azure-container-networking/platform/windows/adapter/mellanox"
@@ -21,6 +22,8 @@ import (
2122
"golang.org/x/sys/windows"
2223
)
2324

25+
var logger = zaplog.CNILogger.With(zap.String("component", "platform-windows"))
26+
2427
const (
2528
// CNMRuntimePath is the path where CNM state files are stored.
2629
CNMRuntimePath = ""
@@ -163,7 +166,7 @@ func ExecutePowershellCommand(command string) (string, error) {
163166
return "", fmt.Errorf("Failed to find powershell executable")
164167
}
165168

166-
logger.Info("[Azure-Utils]", string("command", command))
169+
logger.Info("[Azure-Utils]", zap.String("command", command))
167170

168171
cmd := exec.Command(ps, command)
169172
var stdout bytes.Buffer

0 commit comments

Comments
 (0)