From a52c9f0ac6a2d4685b0e64e91b8a24b977ff6eec Mon Sep 17 00:00:00 2001 From: Christopher Desiniotis Date: Tue, 14 Feb 2023 16:32:40 -0800 Subject: [PATCH] fix: apply options when constructing an instance of the nvcdi library Signed-off-by: Christopher Desiniotis --- pkg/nvcdi/lib.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/nvcdi/lib.go b/pkg/nvcdi/lib.go index c2348d4e..0ea1797f 100644 --- a/pkg/nvcdi/lib.go +++ b/pkg/nvcdi/lib.go @@ -37,6 +37,9 @@ type nvcdilib struct { // New creates a new nvcdi library func New(opts ...Option) Interface { l := &nvcdilib{} + for _, opt := range opts { + opt(l) + } if l.nvmllib == nil { l.nvmllib = nvml.New()