MCPcopy
hub / github.com/larksuite/cli / readMarkdownDiffPayload

Function readMarkdownDiffPayload

shortcuts/markdown/markdown_diff.go:200–209  ·  view source on GitHub ↗
(r io.Reader, source string)

Source from the content-addressed store, hash-verified

198}
199
200func readMarkdownDiffPayload(r io.Reader, source string) ([]byte, error) {
201 payload, err := io.ReadAll(io.LimitReader(r, markdownDiffMaxContentBytes+1))
202 if err != nil {
203 return nil, err
204 }
205 if len(payload) > markdownDiffMaxContentBytes {
206 return nil, markdownValidationError("%s exceeds %s markdown +diff content limit", source, common.FormatSize(markdownDiffMaxContentBytes))
207 }
208 return payload, nil
209}
210
211func splitMarkdownDiffLines(text string) []string {
212 if text == "" {

Callers 2

downloadMarkdownContentFunction · 0.85
readMarkdownLocalFileFunction · 0.85

Calls 2

FormatSizeFunction · 0.92
markdownValidationErrorFunction · 0.85

Tested by

no test coverage detected