MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / ptrOrDefault

Function ptrOrDefault

server-source-code/internal/handler/discord.go:474–479  ·  view source on GitHub ↗
(p *string, def string)

Source from the content-addressed store, hash-verified

472}
473
474func ptrOrDefault(p *string, def string) string {
475 if p != nil && *p != "" {
476 return *p
477 }
478 return def
479}
480
481func applyDiscordSettingsUpdate(s *models.Settings, req map[string]interface{}, enc *util.Encryption) {
482 if v, ok := getReqBool(req, "discord_oauth_enabled", "discordOauthEnabled"); ok {

Callers 3

oidcSettingsResponseFunction · 0.85
GetSettingsMethod · 0.85
UpdateSettingsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected