From b496591e7c1cd2c82ac57d96468185c95d8c26a3 Mon Sep 17 00:00:00 2001 From: Qi Xiao Date: Mon, 6 Jan 2020 22:17:48 +0000 Subject: [PATCH] pkg/eval: Slightly simplify implementation of fopen. --- pkg/eval/builtin_fn_io.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/eval/builtin_fn_io.go b/pkg/eval/builtin_fn_io.go index 163d3bbf..bb4f41e4 100644 --- a/pkg/eval/builtin_fn_io.go +++ b/pkg/eval/builtin_fn_io.go @@ -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 {