mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 01:47:51 +08:00
pkg/eval: Slightly simplify implementation of fopen.
This commit is contained in:
parent
10b4baf89c
commit
b496591e7c
|
@ -231,10 +231,9 @@ func toJSON(fm *Frame, inputs Inputs) error {
|
|||
return errEncode
|
||||
}
|
||||
|
||||
func fopen(fm *Frame, name string) (vals.File, error) {
|
||||
func fopen(name string) (vals.File, error) {
|
||||
// TODO support opening files for writing etc as well.
|
||||
f, err := os.Open(name)
|
||||
return f, err
|
||||
return os.Open(name)
|
||||
}
|
||||
|
||||
func fclose(f vals.File) error {
|
||||
|
|
Loading…
Reference in New Issue
Block a user