MCPcopy Create free account
hub / github.com/gogs/gogs / DiscordTextFormatter

Function DiscordTextFormatter

internal/database/webhook_discord.go:57–59  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

55}
56
57func DiscordTextFormatter(s string) string {
58 return strings.Split(s, "\n")[0]
59}
60
61func DiscordLinkFormatter(url, text string) string {
62 return fmt.Sprintf("[%s](%s)", text, url)

Callers 1

getDiscordPushPayloadFunction · 0.85

Calls 1

SplitMethod · 0.80

Tested by

no test coverage detected