Skip to content

Commit 7ac52d2

Browse files
committed
sources: fix golang linter errors
Signed-off-by: Vighnesh Maheshwari <vighmah@amazon.com>
1 parent d111459 commit 7ac52d2

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

  • sources

sources/ecs-gpu-init/cmd/ecs-gpu-init/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func main() {
2323
// GenerateGPUInfoConfig generates the configuration used by the ECS agent
2424
func generateGPUInfoConfig() error {
2525
if ret := nvml.Init(); ret != nvml.SUCCESS {
26-
return fmt.Errorf("Failed to initialize NVML, got ret %v", ret)
26+
return fmt.Errorf("failed to initialize NVML, got ret %v", ret)
2727
}
2828
defer func() {
2929
ret := nvml.Shutdown()
@@ -34,7 +34,7 @@ func generateGPUInfoConfig() error {
3434

3535
version, ret := nvml.SystemGetDriverVersion()
3636
if ret != nvml.SUCCESS {
37-
return fmt.Errorf("Failed to get version, got ret %v", ret)
37+
return fmt.Errorf("failed to get version, got ret %v", ret)
3838
}
3939
gpuIDs, err := getGPUDeviceIDs()
4040
if err != nil {
@@ -48,7 +48,7 @@ func generateGPUInfoConfig() error {
4848
func getGPUDeviceIDs() ([]string, error) {
4949
count, ret := nvml.DeviceGetCount()
5050
if ret != nvml.SUCCESS {
51-
return nil, fmt.Errorf("Failed to get device count, got ret %v", ret)
51+
return nil, fmt.Errorf("failed to get device count, got ret %v", ret)
5252
}
5353
var (
5454
gpuIDs []string
@@ -63,7 +63,7 @@ func getGPUDeviceIDs() ([]string, error) {
6363
gpuIDs = append(gpuIDs, uuid)
6464
}
6565
if len(errors) > 0 {
66-
return nil, fmt.Errorf("Found errors while initializing devices: %s", errors)
66+
return nil, fmt.Errorf("found errors while initializing devices: %s", errors)
6767
}
6868
return gpuIDs, nil
6969
}
@@ -92,11 +92,11 @@ func writeGPUInfo(version string, gpuIDs []string) error {
9292
func getDeviceUUID(idx int) (string, error) {
9393
d, ret := nvml.DeviceGetHandleByIndex(idx)
9494
if ret != nvml.SUCCESS {
95-
return "", fmt.Errorf("Failed to get device at index %d, got ret %v", idx, ret)
95+
return "", fmt.Errorf("failed to get device at index %d, got ret %v", idx, ret)
9696
}
9797
uuid, ret := d.GetUUID()
9898
if ret != nvml.SUCCESS {
99-
return "", fmt.Errorf("Failed to get UUID for device at index %d, got ret %v", idx, ret)
99+
return "", fmt.Errorf("failed to get UUID for device at index %d, got ret %v", idx, ret)
100100
}
101101

102102
return uuid, nil

sources/host-ctr/cmd/host-ctr/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ func runCtr(containerdSocket string, namespace string, containerID string, sourc
509509

510510
// Return error if container exists with non-zero status
511511
if code != 0 {
512-
return fmt.Errorf("Container %s exited with non-zero status", containerID)
512+
return fmt.Errorf("container %s exited with non-zero status", containerID)
513513
}
514514

515515
return nil

0 commit comments

Comments
 (0)