Skip to content

Commit

Permalink
[no-relnote] Remove unused code
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <[email protected]>
  • Loading branch information
elezar committed Nov 26, 2024
1 parent fa66e4c commit 0322f85
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
9 changes: 0 additions & 9 deletions cmd/nvidia-container-runtime-hook/hook_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ const (
// HookConfig : options for the nvidia-container-runtime-hook.
type HookConfig config.Config

func getDefaultHookConfig() (HookConfig, error) {
defaultCfg, err := config.GetDefault()
if err != nil {
return HookConfig{}, err
}

return *(*HookConfig)(defaultCfg), nil
}

// loadConfig loads the required paths for the hook config.
func loadConfig() (*config.Config, error) {
var configPaths []string
Expand Down
10 changes: 0 additions & 10 deletions internal/config/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,3 @@ type RuntimeHookConfig struct {
// SkipModeDetection disables the mode check for the runtime hook.
SkipModeDetection bool `toml:"skip-mode-detection"`
}

// GetDefaultRuntimeHookConfig defines the default values for the config
func GetDefaultRuntimeHookConfig() (*RuntimeHookConfig, error) {
cfg, err := GetDefault()
if err != nil {
return nil, err
}

return &cfg.NVIDIAContainerRuntimeHookConfig, nil
}
10 changes: 0 additions & 10 deletions internal/config/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,3 @@ type cdiModeConfig struct {
type csvModeConfig struct {
MountSpecPath string `toml:"mount-spec-path"`
}

// GetDefaultRuntimeConfig defines the default values for the config
func GetDefaultRuntimeConfig() (*RuntimeConfig, error) {
cfg, err := GetDefault()
if err != nil {
return nil, err
}

return &cfg.NVIDIAContainerRuntimeConfig, nil
}

0 comments on commit 0322f85

Please sign in to comment.