From 781a2c656e55a743023f91561537f8ec0d92ca78 Mon Sep 17 00:00:00 2001 From: Prince Kumar Date: Sat, 2 Nov 2024 13:52:23 +0000 Subject: [PATCH] lint issue --- main.go | 7 +++---- metrics_exporter.go | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 73fe1c4..d8d8de0 100644 --- a/main.go +++ b/main.go @@ -61,7 +61,7 @@ var ( // Cloud profiler. enableCloudProfiler = flag.Bool("enable-cloud-profiler", false, "Enable cloud profiler") enableHeap = flag.Bool("heap", false, "enable heap profile collection") - enableCpu = flag.Bool("cpu", true, "enable heap profile collection") + enableCPU = flag.Bool("cpu", true, "enable cpu profile collection") enableHeapAlloc = flag.Bool("heap_alloc", false, "enable heap allocation profile collection") enableThread = flag.Bool("thread", false, "enable thread profile collection") enableContention = flag.Bool("contention", false, "enable contention profile collection") @@ -122,9 +122,8 @@ func CreateHTTPClient(ctx context.Context, isHTTP2 bool) (client *storage.Client Min: time.Second, TargetPercentile: 0.99, })) - } else { - return storage.NewClient(ctx, option.WithHTTPClient(httpClient)) } + return storage.NewClient(ctx, option.WithHTTPClient(httpClient)) } // CreateGrpcClient creates grpc client. @@ -200,7 +199,7 @@ func main() { Service: "custom-go-benchmark", ServiceVersion: *version, ProjectID: *projectID, - NoCPUProfiling: !*enableCpu, + NoCPUProfiling: !*enableCPU, NoHeapProfiling: !*enableHeap, NoAllocProfiling: !*enableHeapAlloc, NoGoroutineProfiling: !*enableThread, diff --git a/metrics_exporter.go b/metrics_exporter.go index 80e1d3d..2e522c0 100644 --- a/metrics_exporter.go +++ b/metrics_exporter.go @@ -43,7 +43,7 @@ func registerFirstByteLatencyView() { } if err := view.Register(v); err != nil { - log.Fatalf("Failed to register the readLatency view: %v", err) + log.Fatalf("Failed to register the firstByteReadLatency view: %v", err) } }