MCPcopy Index your code
hub / github.com/dnote/dnote / PutAlert

Method PutAlert

pkg/server/views/data.go:63–72  ·  view source on GitHub ↗

PutAlert puts an alert in the given data.

(alert Alert, alertInYield bool)

Source from the content-addressed store, hash-verified

61
62// PutAlert puts an alert in the given data.
63func (d *Data) PutAlert(alert Alert, alertInYield bool) {
64 if alertInYield {
65 if d.Yield == nil {
66 d.Yield = map[string]interface{}{}
67 }
68 d.Yield["Alert"] = &alert
69 } else {
70 d.Alert = &alert
71 }
72}
73
74// SetAlert sets alert in the given data for given error.
75func (d *Data) SetAlert(err error, alertInYield bool) {

Callers 2

SetAlertMethod · 0.95
RenderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected