From 46cdf8c41a0844d65e29f90613f1f97a0a960a92 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Thu, 1 Jul 2021 16:13:22 +0200 Subject: [PATCH] Address ineffectual assignment error Signed-off-by: Evan Lezar --- Makefile | 2 +- examples/discover/main.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c0b378b8..622fc032 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ $(EXAMPLE_TARGETS): example-%: GOOS=$(GOOS) go build ./examples/$(*) all: check test build binary -check: assert-fmt lint vet +check: $(CHECK_TARGETS) # Apply go fmt to the codebase fmt: diff --git a/examples/discover/main.go b/examples/discover/main.go index ef490386..fee40a6b 100644 --- a/examples/discover/main.go +++ b/examples/discover/main.go @@ -28,6 +28,10 @@ func main() { log.Infof("Starting device discovery with NVML") d, err := discover.NewNVMLServer("") + if err != nil { + log.Errorf("Error creating NVML Server: %v", err) + return + } devices, err := d.Devices() if err != nil {