MCPcopy Create free account
hub / github.com/ddev/ddev / WarningOnce

Function WarningOnce

pkg/util/utils.go:101–104  ·  view source on GitHub ↗

WarningOnce will present the user with warning text only once per message.

(format string, a ...any)

Source from the content-addressed store, hash-verified

99
100// WarningOnce will present the user with warning text only once per message.
101func WarningOnce(format string, a ...any) {
102 defer TimeTrackC("WarningOnce(): " + fmt.Sprintf(format, a...))()
103 outputOnce(format, a, Warning)
104}
105
106// WarningWithColor allows specifying a color for the warning to make it more visible
107func WarningWithColor(color string, format string, a ...any) {

Callers 15

CheckCustomConfigMethod · 0.92
CheckRouterPortsFunction · 0.92
CreateGitIgnoreFunction · 0.92
WriteConfigMethod · 0.92
CheckDeprecationsMethod · 0.92
fixupComposeYamlFunction · 0.92
StartMethod · 0.92
DockerEnvMethod · 0.92
CheckSetUpFunction · 0.92
RemoveNetworkDuplicatesFunction · 0.92
TestWarningOnceFunction · 0.92

Calls 2

TimeTrackCFunction · 0.85
outputOnceFunction · 0.85

Tested by 1

TestWarningOnceFunction · 0.74