From c087ba891bce48daf9f292546f516aa3021b0e0d Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 21 Jan 2019 15:39:10 +0500 Subject: [PATCH] os: use SeekStart, SeekCurrent and SeekEnd instead deprecated values --- compiler/stdlib/os.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/stdlib/os.go b/compiler/stdlib/os.go index 826d582..21ad689 100644 --- a/compiler/stdlib/os.go +++ b/compiler/stdlib/os.go @@ -1,6 +1,7 @@ package stdlib import ( + "io" "os" "github.com/d5/tengo/objects" @@ -32,9 +33,9 @@ var osModule = map[string]objects.Object{ "path_separator": &objects.Char{Value: os.PathSeparator}, "path_list_separator": &objects.Char{Value: os.PathListSeparator}, "dev_null": &objects.String{Value: os.DevNull}, - "seek_set": &objects.Int{Value: int64(os.SEEK_SET)}, - "seek_cur": &objects.Int{Value: int64(os.SEEK_CUR)}, - "seek_end": &objects.Int{Value: int64(os.SEEK_END)}, + "seek_set": &objects.Int{Value: int64(io.SeekStart)}, + "seek_cur": &objects.Int{Value: int64(io.SeekCurrent)}, + "seek_end": &objects.Int{Value: int64(io.SeekEnd)}, // args() => array(string) "args": &objects.UserFunction{Value: osArgs}, // chdir(dir string) => error