Skip to content

Commit 8c23c33

Browse files
committed
Merge branch 'fix-lint-issues' into 'main'
fix issues reported by golint See merge request nvidia/cloud-native/vgpu-device-manager!26
2 parents aa43bc2 + 725831c commit 8c23c33

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

cmd/nvidia-vgpu-dm/apply/apply.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ func CheckFlags(f *Flags) error {
8181
// AssertVGPUConfig reuses calls from the 'assert' subcommand to check if the vGPU devices of a particular vGPU config are currently applied.
8282
// The 'VGPUConfig' being checked is embedded in the 'Context' struct itself.
8383
func (c *Context) AssertVGPUConfig() error {
84-
return assert.AssertVGPUConfig(&c.Context)
84+
return assert.VGPUConfig(&c.Context)
8585
}
8686

8787
// ApplyVGPUConfig applies a particular vGPU config to the node.
8888
// The 'VGPUConfig' being applied is embedded in the 'Context' struct itself.
8989
func (c *Context) ApplyVGPUConfig() error {
90-
return ApplyVGPUConfig(c)
90+
return VGPUConfig(c)
9191
}
9292

9393
func applyWrapper(c *cli.Context, f *Flags) error {

cmd/nvidia-vgpu-dm/apply/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import (
2525
"gitlab.com/nvidia/cloud-native/vgpu-device-manager/pkg/vgpu"
2626
)
2727

28-
// ApplyVGPUConfig applies the selected vGPU config to the node
29-
func ApplyVGPUConfig(c *Context) error {
28+
// VGPUConfig applies the selected vGPU config to the node
29+
func VGPUConfig(c *Context) error {
3030
return assert.WalkSelectedVGPUConfigForEachGPU(c.VGPUConfig, func(vc *v1.VGPUConfigSpec, i int, d types.DeviceID) error {
3131
configManager := vgpu.NewNvlibVGPUConfigManager()
3232
current, err := configManager.GetVGPUConfig(i)

cmd/nvidia-vgpu-dm/assert/assert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func assertWrapper(c *cli.Context, f *Flags) error {
120120
}
121121

122122
log.Debugf("Asserting vGPU device configuration...")
123-
err = AssertVGPUConfig(&context)
123+
err = VGPUConfig(&context)
124124
if err != nil {
125125
log.Debug(err.Error())
126126
return fmt.Errorf("Assertion failure: selected configuration not currently applied")

cmd/nvidia-vgpu-dm/assert/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import (
2525
"gitlab.com/nvidia/cloud-native/vgpu-device-manager/pkg/vgpu"
2626
)
2727

28-
// AssertVGPUConfig asserts that the selected vGPU config is applied to the node
29-
func AssertVGPUConfig(c *Context) error {
28+
// VGPUConfig asserts that the selected vGPU config is applied to the node
29+
func VGPUConfig(c *Context) error {
3030
nvpci := nvpci.New()
3131
gpus, err := nvpci.GetGPUs()
3232
if err != nil {

0 commit comments

Comments
 (0)