Skip to content

Commit 8934440

Browse files
authored
Merge pull request #63 from scr-oath/newer-go
Bumping to newer go (at least 1.16) and using the embed technique instead of needing textFileToGoConst
2 parents 927bc9c + 72ab7f0 commit 8934440

File tree

14 files changed

+25
-852
lines changed

14 files changed

+25
-852
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
go: ['1.14', '1.15', '1.16', '1.17', '1.18', '1.19', '1.20', '1.21']
15+
go: [ '1.16', '1.17', '1.18', '1.19', '1.20','1.21' ]
1616

17-
services: {}
17+
services: { }
1818
steps:
1919
- name: Set up Go
2020
uses: actions/setup-go@v2

argparse/loader.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package argparse
22

33
import (
4+
_ "embed"
45
lua "github.com/yuin/gopher-lua"
56
)
67

7-
// TODO(scr): move to embed once minimum supported go version is 1.16
8-
//go:generate go run github.com/logrusorgru/textFileToGoConst@latest -in argparse.lua -o lua_const.go -c lua_argparse
8+
//go:embed argparse.lua
9+
var lua_argparse string
910

1011
// Preload adds inspect to the given Lua state's package.preload table. After it
1112
// has been preloaded, it can be loaded using require:

argparse/lua_const.go

Lines changed: 0 additions & 8 deletions
This file was deleted.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/vadv/gopher-lua-libs
22

3-
go 1.13
3+
go 1.16
44

55
require (
66
github.com/alessio/shellescape v1.4.1

go.sum

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc
173173
golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886 h1:eJv7u3ksNXoLbGSKuv2s/SIO4tJVxc/A+MTpzxDgz/Q=
174174
golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
175175
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
176-
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
177176
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
178177
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
179178
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=

inspect/loader.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package inspect
22

3-
// TODO(scr): move to embed once minimum supported go version is 1.16
4-
//go:generate go run github.com/logrusorgru/textFileToGoConst@latest -in inspect.lua -o lua_const.go -c lua_inspect
5-
63
import (
4+
_ "embed"
75
lua "github.com/yuin/gopher-lua"
86
)
97

8+
//go:embed inspect.lua
9+
var lua_inspect string
10+
1011
// Preload adds inspect to the given Lua state's package.preload table. After it
1112
// has been preloaded, it can be loaded using require:
1213
//

0 commit comments

Comments
 (0)