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 {