We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0441413 commit 468e405Copy full SHA for 468e405
txtar/fs.go
@@ -153,8 +153,7 @@ func (fsys *filesystem) ReadFile(name string) ([]byte, error) {
153
return nil, err
154
}
155
if file, ok := file.(*openFile); ok {
156
- cp := slices.Clone(file.data)
157
- return cp, err
+ return slices.Clone(file.data), nil
158
159
return nil, &fs.PathError{Op: "read", Path: name, Err: fs.ErrInvalid}
160
0 commit comments