Giter Site home page Giter Site logo

binder's People

Contributors

alexeyco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

binder's Issues

How do you add global values/Call global methods?

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?

Panic with String field in module

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.