2024-06-07 11:29:46 +03:00
|
|
|
package xmodules
|
|
|
|
|
|
|
|
import "github.com/d5/tengo/v2/stdlib"
|
|
|
|
import "surdeus.su/core/xgo/xmodules/cjson"
|
|
|
|
import "surdeus.su/core/xgo/xmodules/logx"
|
|
|
|
import "surdeus.su/core/xgo/xmodules/paths"
|
|
|
|
import "surdeus.su/core/xgo/xmodules/httpx"
|
2024-06-07 19:26:51 +03:00
|
|
|
import "surdeus.su/core/xgo/xmodules/htmlx"
|
2024-06-14 23:00:26 +03:00
|
|
|
import "surdeus.su/core/xgo/xmodules/objects"
|
2024-06-18 19:33:03 +03:00
|
|
|
import "surdeus.su/core/xgo/xmodules/enumx"
|
2024-06-07 11:29:46 +03:00
|
|
|
import "github.com/d5/tengo/v2"
|
|
|
|
|
|
|
|
// The main map to import all the implemented modules.
|
2024-06-14 23:00:26 +03:00
|
|
|
func GetModules() *tengo.ModuleMap {
|
2024-06-07 11:29:46 +03:00
|
|
|
ret := stdlib.GetModuleMap(stdlib.AllModuleNames()...)
|
|
|
|
ret.AddBuiltinModule("cjson", cjson.Module)
|
|
|
|
ret.AddBuiltinModule("log", logx.Module)
|
|
|
|
ret.AddBuiltinModule("paths", paths.Module)
|
|
|
|
ret.AddBuiltinModule("http", httpx.Module)
|
2024-06-07 19:26:51 +03:00
|
|
|
ret.AddBuiltinModule("html", htmlx.Module)
|
2024-06-14 23:00:26 +03:00
|
|
|
ret.Add("objects", objects.GetModule())
|
2024-06-18 19:33:03 +03:00
|
|
|
ret.Add("enumx", enumx.GetModule())
|
2024-06-07 11:29:46 +03:00
|
|
|
return ret
|
2024-06-14 23:00:26 +03:00
|
|
|
}
|