MCPcopy
hub / github.com/knadh/listmonk / makeMsgTpl

Function makeMsgTpl

cmd/utils.go:44–53  ·  view source on GitHub ↗

makeMsgTpl takes a page title, heading, and message and returns a msgTpl that can be rendered as an HTML view. This is used for rendering arbitrary HTML views with error and success messages.

(pageTitle, heading, msg string)

Source from the content-addressed store, hash-verified

42// a msgTpl that can be rendered as an HTML view. This is used for
43// rendering arbitrary HTML views with error and success messages.
44func makeMsgTpl(pageTitle, heading, msg string) msgTpl {
45 if heading == "" {
46 heading = pageTitle
47 }
48 err := msgTpl{}
49 err.Title = pageTitle
50 err.MessageTitle = heading
51 err.Message = msg
52 return err
53}
54
55// parseStringIDs takes a slice of numeric string IDs and
56// parses each number into an int64 and returns a slice of the

Callers 15

CampaignArchivePageMethod · 0.85
ViewCampaignMessageMethod · 0.85
SubscriptionPageMethod · 0.85
SubscriptionPrefsMethod · 0.85
OptinPageMethod · 0.85
SubscriptionFormPageMethod · 0.85
SubscriptionFormMethod · 0.85
LinkRedirectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected