xgoprev/xmodules/modules.go

19 lines
608 B
Go
Raw Normal View History

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"
import "github.com/d5/tengo/v2"
// The main map to import all the implemented modules.
var Modules = func() *tengo.ModuleMap {
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)
return ret
}()