mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Extend nvidia-ctk config command to allow options to be set
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -148,6 +148,21 @@ func (t Toml) format(contents []byte) ([]byte, error) {
|
||||
return replaced, nil
|
||||
}
|
||||
|
||||
// Delete deletes the specified key from the TOML config.
|
||||
func (t *Toml) Delete(key string) error {
|
||||
return (*toml.Tree)(t).Delete(key)
|
||||
}
|
||||
|
||||
// Get returns the value for the specified key.
|
||||
func (t *Toml) Get(key string) interface{} {
|
||||
return (*toml.Tree)(t).Get(key)
|
||||
}
|
||||
|
||||
// Set sets the specified key to the specified value in the TOML config.
|
||||
func (t *Toml) Set(key string, value interface{}) {
|
||||
(*toml.Tree)(t).Set(key, value)
|
||||
}
|
||||
|
||||
// commentDefaults applies the required comments for default values to the Toml.
|
||||
func (t *Toml) commentDefaults() *Toml {
|
||||
asToml := (*toml.Tree)(t)
|
||||
|
||||
Reference in New Issue
Block a user