forked from vadv/gopher-lua-libs
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpreload.go
57 lines (55 loc) · 1.6 KB
/
preload.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package libs
import (
"github.com/metafates/mangal-lua-libs/base64"
"github.com/metafates/mangal-lua-libs/crypto"
"github.com/metafates/mangal-lua-libs/filepath"
"github.com/metafates/mangal-lua-libs/goos"
"github.com/metafates/mangal-lua-libs/headless"
"github.com/metafates/mangal-lua-libs/html"
"github.com/metafates/mangal-lua-libs/http"
"github.com/metafates/mangal-lua-libs/humanize"
"github.com/metafates/mangal-lua-libs/inspect"
"github.com/metafates/mangal-lua-libs/ioutil"
"github.com/metafates/mangal-lua-libs/json"
"github.com/metafates/mangal-lua-libs/log"
"github.com/metafates/mangal-lua-libs/regexp"
"github.com/metafates/mangal-lua-libs/runtime"
"github.com/metafates/mangal-lua-libs/shellescape"
"github.com/metafates/mangal-lua-libs/stats"
"github.com/metafates/mangal-lua-libs/storage"
"github.com/metafates/mangal-lua-libs/strings"
"github.com/metafates/mangal-lua-libs/template"
"github.com/metafates/mangal-lua-libs/time"
"github.com/metafates/mangal-lua-libs/xmlpath"
"github.com/metafates/mangal-lua-libs/yaml"
lua "github.com/yuin/gopher-lua"
)
// Preload preload all gopher lua packages
func Preload(L *lua.LState) {
for _, preload := range []func(*lua.LState){
yaml.Preload,
html.Preload,
headless.Preload,
xmlpath.Preload,
time.Preload,
template.Preload,
strings.Preload,
storage.Preload,
stats.Preload,
shellescape.Preload,
runtime.Preload,
regexp.Preload,
log.Preload,
json.Preload,
ioutil.Preload,
inspect.Preload,
humanize.Preload,
http.Preload,
goos.Preload,
filepath.Preload,
crypto.Preload,
base64.Preload,
} {
preload(L)
}
}