nvidia-container-toolkit/pkg/capabilities.go
Renaud Gaubert 87c8a868f9 Add binary target and use go mod
Signed-off-by: Renaud Gaubert <rgaubert@nvidia.com>
2020-04-11 17:18:14 -07:00

26 lines
392 B
Go

package main
import (
"log"
)
func capabilityToCLI(cap string) string {
switch cap {
case "compute":
return "--compute"
case "compat32":
return "--compat32"
case "graphics":
return "--graphics"
case "utility":
return "--utility"
case "video":
return "--video"
case "display":
return "--display"
default:
log.Panicln("unknown driver capability:", cap)
}
return ""
}