MCPcopy Index your code
hub / github.com/go-task/task / Read

Method Read

taskfile/node_file.go:52–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52func (node *FileNode) Read() ([]byte, error) {
53 f, err := os.Open(node.Location())
54 if err != nil {
55 return nil, err
56 }
57 defer f.Close()
58 return io.ReadAll(f)
59}
60
61func (node *FileNode) ResolveEntrypoint(entrypoint string) (string, error) {
62 // If the file is remote, we don't need to resolve the path

Callers

nothing calls this directly

Calls 2

LocationMethod · 0.95
CloseMethod · 0.80

Tested by

no test coverage detected