Commit b7a7fd46 authored by Felix Lange's avatar Felix Lange Committed by Matt Holt

caddy/caddymain: make EnableTelemetry a variable (#2191)

This makes setting the flag easier in projects that embed package caddymain.
parent 06b067b0
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment