Skip to content

Commit

Permalink
Merge pull request #577 from tariq1890/no-map-ptr
Browse files Browse the repository at this point in the history
avoid using map pointers as maps are always passed by reference
  • Loading branch information
elezar committed Jul 3, 2024
2 parents 15c884e + 70ef0fb commit 6732f6d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/container/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ const (
)

// Runtime defines a runtime to be configured.
// The path and whether the runtime is the default runtime can be specfied
// The path and whether the runtime is the default runtime can be specified
type Runtime struct {
name string
Path string
SetAsDefault bool
}

// Runtimes defines a set of runtimes to be configure for use in the GPU Operator
// Runtimes defines a set of runtimes to be configured for use in the GPU Operator
type Runtimes map[string]Runtime

type config struct {
Expand Down Expand Up @@ -76,8 +76,8 @@ func (r Runtimes) DefaultRuntimeName() string {
}

// Add a runtime to the set of runtimes.
func (r *Runtimes) add(runtime Runtime) {
(*r)[runtime.name] = runtime
func (r Runtimes) add(runtime Runtime) {
r[runtime.name] = runtime
}

// nvidiaRuntime creates a runtime that corresponds to the nvidia runtime.
Expand Down

0 comments on commit 6732f6d

Please sign in to comment.