(ctx context.Context, kctx *kong.Context)
| 106 | } |
| 107 | |
| 108 | func (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 | |
| 122 | func (c *DocsWriteCmd) writePlainText(ctx context.Context, flags *RootFlags, docID, text string) error { |
| 123 | if c.Append && c.Format.createsBullets() && c.Format.hasParagraphStyle() { |
no test coverage detected