Skip to content

Commit

Permalink
updated for golint
Browse files Browse the repository at this point in the history
  • Loading branch information
Bianco95 committed Feb 4, 2025
1 parent 1640038 commit d4dfc4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/virtualkubelet/virtualkubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ func SetDefaultResource(config *Config) {
for i, accelerator := range config.Resources.Accelerators {
if accelerator.Available == 0 {
switch accelerator.ResourceType {
case "nvidia.com/gpu", "amd.com/gpu", "intel.com/gpu":
case nvidiaGPU, amdGPU, intelGPU:
defaultGPUCapacity, err := strconv.Atoi(DefaultGPUCapacity)
if err != nil {
log.G(context.Background()).Errorf("Invalid default GPU capacity: %v", err)
defaultGPUCapacity = 0
}
config.Resources.Accelerators[i].Available = defaultGPUCapacity
case "xilinx.com/fpga", "intel.com/fpga":
case xilinxFPGA, intelFPGA:
defaultFPGACapacity, err := strconv.Atoi(DefaultFPGACapacity)
if err != nil {
log.G(context.Background()).Errorf("Invalid default FPGA capacity: %v", err)
Expand Down

0 comments on commit d4dfc4b

Please sign in to comment.