()
| 91 | } |
| 92 | |
| 93 | func (c *DocsWriteCmd) validateDocumentStyle() error { |
| 94 | if !c.Pageless && !c.Layout.any() { |
| 95 | return nil |
| 96 | } |
| 97 | mode := "" |
| 98 | if c.Pageless { |
| 99 | mode = docsDocumentModePageless |
| 100 | } |
| 101 | _, err := buildUpdateDocumentStyleRequest(docsDocumentStyleOptions{ |
| 102 | Mode: mode, |
| 103 | DocsLayoutFlags: c.Layout, |
| 104 | }) |
| 105 | return err |
| 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) |
no test coverage detected