(ctx context.Context, path string)
| 80 | } |
| 81 | |
| 82 | func readTextInput(ctx context.Context, path string) ([]byte, error) { |
| 83 | if path == "-" { |
| 84 | return io.ReadAll(stdinReader(ctx)) |
| 85 | } |
| 86 | expanded, err := config.ExpandPath(path) |
| 87 | if err != nil { |
| 88 | return nil, err |
| 89 | } |
| 90 | return os.ReadFile(expanded) //nolint:gosec // user-provided path |
| 91 | } |
| 92 | |
| 93 | func docsDocumentEndIndex(doc *docs.Document) int64 { |
| 94 | if doc == nil || doc.Body == nil { |
no test coverage detected