Lua判断OS并添加cpath(金庆的专栏)Lua初始化时需要根据OS来设置package.cpath, 如果是Windows系统则添加 ?.dll, 否则添加 ?.so.不然加载错误后缀名的动态库会报错.local function add_package_cpath(subDir) if is_windows then package.cpath = package.cpath..";"..G_LUA_ROOTPATH.."/"..subDi
在VScode中调试Go程序时提示: can't load package: package .: no buildable Go source files in d:\my_workspace\go_ws exit status 1 Process exiting with code: 1 lauch.json配置如下: { "version": "0.2.0", "configurations": [{ "name":
nginx 配置: header_filter_by_lua_file cros.lua; access_by_lua ' if ngx.var.request_method == "OPTIONS" then end '; cros.lua: if string.find(ngx.var.http_origin,":8008") then //判断request的origin ngx.header["Access-Control-Allow-Creden