MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / extractDisplayName

Function extractDisplayName

agent/app/service/agents_channels.go:1498–1510  ·  view source on GitHub ↗
(values map[string]interface{}, fallback string, accountID string)

Source from the content-addressed store, hash-verified

1496}
1497
1498func extractDisplayName(values map[string]interface{}, fallback string, accountID string) string {
1499 name := extractStringValue(values["name"])
1500 if name != "" {
1501 return name
1502 }
1503 if fallback != "" {
1504 return fallback
1505 }
1506 if accountID == "default" {
1507 return "Default"
1508 }
1509 return accountID
1510}
1511
1512func normalizeDefaultAccount(defaultAccount string, accountIDs []string) string {
1513 if len(accountIDs) == 0 {

Callers 4

extractFeishuConfigFunction · 0.85
extractTelegramConfigFunction · 0.85
extractDiscordConfigFunction · 0.85
extractQQBotConfigFunction · 0.85

Calls 1

extractStringValueFunction · 0.85

Tested by

no test coverage detected