alexeyco / binder Goto Github PK
View Code? Open in Web Editor NEWHigh level go to Lua binder. Write less, do more.
License: MIT License
High level go to Lua binder. Write less, do more.
License: MIT License
Hey, this looks great! Much simpler than the API I've created for simplifying working with gopher-lua
.
I was curious though, I can't seem to find a way to assign variables or access existing variables (like, for example, wanted to reassign the package loaders or load paths, etc..), am I just missing something?
Hi,
This code is throwing a panic error and can't figure what the problem is:
b := binder.New()
m := b.Module("request")
m.String("host", "foo")
b.DoString(`
local r=require 'request'
print(r.host)
`)
panic({0x94ef40, 0xe38c70})
/usr/lib/go-1.18/src/runtime/panic.go:844 +0x258
github.com/yuin/gopher-lua.(*LState).PCall(0xc0000cf3f0, 0x0, 0xc0002bad40?, 0x0)
/home/luis/go/pkg/mod/github.com/yuin/[email protected]/state.go:1972 +0x68
github.com/yuin/gopher-lua.(*LState).DoString(0xc0000cf3f0, {0x9f8d4d?, 0x110?})
/home/luis/go/pkg/mod/github.com/yuin/[email protected]/auxlib.go:405 +0x6b
github.com/alexeyco/binder.(*Binder).DoString(0xc0002be0c0, {0x9f8d4d, 0x1d})
/home/luis/go/pkg/mod/github.com/alexeyco/[email protected]/binder.go:26 +0x139
main.(*application).luaHandler(0xe52e40?, {0xb33470, 0xc0001aa1c0}, 0x20?)
/home/luis/noname-backend/cmd/api/lua.go:26 +0x2b0
Using
go 1.18.1
github.com/alexeyco/binder v0.0.0-20180729220023-2a21303f588a
Any hint ?
Thanks,
Luis
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.