MCPcopy Create free account
hub / github.com/campoy/embedmd / Process

Function Process

embedmd/embedmd.go:65–71  ·  view source on GitHub ↗

Process reads markdown from the given io.Reader searching for an embedmd command. When a command is found, it is executed and the output is written into the given io.Writer with the rest of standard markdown.

(ctx context.Context, out io.Writer, in io.Reader, opts ...Option)

Source from the content-addressed store, hash-verified

63// command. When a command is found, it is executed and the output is written
64// into the given io.Writer with the rest of standard markdown.
65func Process(ctx context.Context, out io.Writer, in io.Reader, opts ...Option) error {
66 e := embedder{Fetcher: fetcher{}}
67 for _, opt := range opts {
68 opt.f(&e)
69 }
70 return process(out, in, e.runCommand)
71}
72
73// An Option provides a way to adapt the Process function to your needs.
74type Option struct{ f func(*embedder) }

Callers 1

TestProcessFunction · 0.85

Calls 1

processFunction · 0.85

Tested by 1

TestProcessFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…