mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-12 14:07:28 +00:00
17 lines
423 B
Go
17 lines
423 B
Go
//go:build !release
|
|
|
|
package mockmode
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
// IsEnabled reports whether Pulse is running in mock mode.
|
|
//
|
|
// This intentionally reads the environment variable instead of importing the full
|
|
// internal/mock package, to avoid dependency cycles in low-level packages.
|
|
// Only available in non-release builds.
|
|
func IsEnabled() bool {
|
|
return strings.TrimSpace(os.Getenv("PULSE_MOCK_MODE")) == "true"
|
|
}
|