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

Function readTextInput

internal/cmd/docs_helpers.go:82–91  ·  view source on GitHub ↗
(ctx context.Context, path string)

Source from the content-addressed store, hash-verified

80}
81
82func 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
93func docsDocumentEndIndex(doc *docs.Document) int64 {
94 if doc == nil || doc.Body == nil {

Callers 1

resolveTextInputFunction · 0.85

Calls 2

ExpandPathFunction · 0.92
stdinReaderFunction · 0.85

Tested by

no test coverage detected