Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Sim <[email protected]>
  • Loading branch information
ihcsim committed May 18, 2024
1 parent 79579ca commit 140355c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func run(ctx context.Context) error {

go func() {
s := http.NewServeMux()
s.HandleFunc(fmt.Sprintf("%s", pprofPath), pprof.Index)
s.HandleFunc(pprofPath, pprof.Index)
if err := http.ListenAndServe(fmt.Sprintf(":%d", pprofPort), s); err != nil {
log.Warn().Err(err).Msg("failed to start pprof server")
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/drivers/gpu/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,9 @@ func (d *driver) allocateGPU(

go func() {
<-releaseClaim
//nolint:staticcheck
if err := d.gpu.removeAllocatedClaim(claimUID); err != nil {
// log errors here
//@TODO log errors here
}
}()

Expand Down Expand Up @@ -272,8 +273,7 @@ func getSelectedNode(claim *resourcev1alpha2.ResourceClaim) string {
}

func (d *driver) deallocateGPU(ctx context.Context, claimUID string, gpu allocationv1alpha1.AllocatedGPU) error {
d.gpu.removeAllocatedClaim(claimUID)
return nil
return d.gpu.removeAllocatedClaim(claimUID)
}

// see https://pkg.go.dev/k8s.io/dynamic-resource-allocation/controller#Driver
Expand Down

0 comments on commit 140355c

Please sign in to comment.