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:
parent
06b067b02c
commit
b7a7fd4651
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue