MCPcopy Create free account
hub / github.com/foxcpp/maddy / formatUpdate

Function formatUpdate

internal/updatepipe/serialize.go:60–69  ·  view source on GitHub ↗
(myID string, upd mess.Update)

Source from the content-addressed store, hash-verified

58}
59
60func formatUpdate(myID string, upd mess.Update) (string, error) {
61 updBlob, err := json.Marshal(upd)
62 if err != nil {
63 return "", fmt.Errorf("formatUpdate: %w", err)
64 }
65 return strings.Join([]string{
66 myID,
67 escapeName(string(updBlob)),
68 }, ";") + "\n", nil
69}

Callers 2

PushMethod · 0.85
PushMethod · 0.85

Calls 1

escapeNameFunction · 0.85

Tested by

no test coverage detected