From d7c8daad0de0e0286920a14b5336c45f25387843 Mon Sep 17 00:00:00 2001 From: guangwu Date: Wed, 5 Jul 2023 03:13:41 +0800 Subject: [PATCH] chore: os.SEEK_CUR os.SEEK_END os.SEEK_SET has been deprecated since Go 1.7 (#2856) --- internal/lua/lua.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/lua/lua.go b/internal/lua/lua.go index 59ca6c45..3ce9472f 100644 --- a/internal/lua/lua.go +++ b/internal/lua/lua.go @@ -376,9 +376,9 @@ func importOs() *lua.LTable { L.SetField(pkg, "Remove", luar.New(L, os.Remove)) L.SetField(pkg, "RemoveAll", luar.New(L, os.RemoveAll)) L.SetField(pkg, "Rename", luar.New(L, os.Rename)) - L.SetField(pkg, "SEEK_CUR", luar.New(L, os.SEEK_CUR)) - L.SetField(pkg, "SEEK_END", luar.New(L, os.SEEK_END)) - L.SetField(pkg, "SEEK_SET", luar.New(L, os.SEEK_SET)) + L.SetField(pkg, "SEEK_CUR", luar.New(L, io.SeekCurrent)) + L.SetField(pkg, "SEEK_END", luar.New(L, io.SeekEnd)) + L.SetField(pkg, "SEEK_SET", luar.New(L, io.SeekStart)) L.SetField(pkg, "SameFile", luar.New(L, os.SameFile)) L.SetField(pkg, "Setenv", luar.New(L, os.Setenv)) L.SetField(pkg, "StartProcess", luar.New(L, os.StartProcess))