From 707e3479f829b1537dead0a0a72a483ab968d5b5 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 30 Jan 2023 13:39:57 +0100 Subject: [PATCH] Fix lint errors Signed-off-by: Evan Lezar --- cmd/nvidia-ctk/cdi/generate/generate.go | 4 ++-- cmd/nvidia-ctk/cdi/generate/namer.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/nvidia-ctk/cdi/generate/generate.go b/cmd/nvidia-ctk/cdi/generate/generate.go index 0b0de708..23bd17c9 100644 --- a/cmd/nvidia-ctk/cdi/generate/generate.go +++ b/cmd/nvidia-ctk/cdi/generate/generate.go @@ -117,7 +117,7 @@ func (m command) validateFlags(r *cli.Context, cfg *config) error { return fmt.Errorf("invalid output format: %v", cfg.format) } - _, err := NewDeviceNamer(cfg.deviceNameStrategy) + _, err := newDeviceNamer(cfg.deviceNameStrategy) if err != nil { return err } @@ -126,7 +126,7 @@ func (m command) validateFlags(r *cli.Context, cfg *config) error { } func (m command) run(c *cli.Context, cfg *config) error { - deviceNamer, err := NewDeviceNamer(cfg.deviceNameStrategy) + deviceNamer, err := newDeviceNamer(cfg.deviceNameStrategy) if err != nil { return fmt.Errorf("failed to create device namer: %v", err) } diff --git a/cmd/nvidia-ctk/cdi/generate/namer.go b/cmd/nvidia-ctk/cdi/generate/namer.go index 63131ca9..06e90ea4 100644 --- a/cmd/nvidia-ctk/cdi/generate/namer.go +++ b/cmd/nvidia-ctk/cdi/generate/namer.go @@ -40,9 +40,9 @@ type deviceNameIndex struct { } type deviceNameUUID struct{} -// NewDeviceNamer creates a Device Namer based on the supplied strategy. +// newDeviceNamer creates a Device Namer based on the supplied strategy. // This namer can be used to construct the names for MIG and GPU devices when generating the CDI spec. -func NewDeviceNamer(strategy string) (deviceNamer, error) { +func newDeviceNamer(strategy string) (deviceNamer, error) { switch strategy { case deviceNameStrategyIndex: return deviceNameIndex{}, nil