0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00

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

This makes setting the flag easier in projects that embed package caddymain.
This commit is contained in:
Felix Lange 2018-07-26 22:16:30 +02:00 committed by Matt Holt
parent 06b067b02c
commit b7a7fd4651

View file

@ -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