MCPcopy Create free account
hub / github.com/openclaw/gogcli / resolveWriteText

Method resolveWriteText

internal/cmd/docs_edit.go:108–120  ·  view source on GitHub ↗
(ctx context.Context, kctx *kong.Context)

Source from the content-addressed store, hash-verified

106}
107
108func (c *DocsWriteCmd) resolveWriteText(ctx context.Context, kctx *kong.Context) (string, error) {
109 text, provided, err := resolveTextInput(ctx, c.Text, c.File, kctx)
110 if err != nil {
111 return "", err
112 }
113 if !provided {
114 return "", usage("required: --text or --file")
115 }
116 if text == "" {
117 return "", usage("empty text")
118 }
119 return text, nil
120}
121
122func (c *DocsWriteCmd) writePlainText(ctx context.Context, flags *RootFlags, docID, text string) error {
123 if c.Append && c.Format.createsBullets() && c.Format.hasParagraphStyle() {

Callers 1

RunMethod · 0.95

Calls 2

resolveTextInputFunction · 0.85
usageFunction · 0.85

Tested by

no test coverage detected