From b7a7fd4651cda7604910e0e8ff56caef00757595 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 26 Jul 2018 22:16:30 +0200 Subject: [PATCH] caddy/caddymain: make EnableTelemetry a variable (#2191) This makes setting the flag easier in projects that embed package caddymain. --- caddy/caddymain/run.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/caddy/caddymain/run.go b/caddy/caddymain/run.go index 4b6f8570..516a912e 100644 --- a/caddy/caddymain/run.go +++ b/caddy/caddymain/run.go @@ -98,7 +98,7 @@ func Run() { } // initialize telemetry client - if enableTelemetry { + if EnableTelemetry { err := initTelemetry() if err != nil { mustLogFatalf("[ERROR] Initializing telemetry: %v", err) @@ -519,4 +519,5 @@ var ( gitFilesModified string // git diff-index --name-only HEAD ) -const enableTelemetry = true +// This variable defines whether telemetry is enabled in Run. +var EnableTelemetry = true