Closed
Description
I have a piece of go that imports gopherjs
package main
import (
"github.com/gopherjs/gopherjs/js"
)
func main() {
js.Global.Set("mypackage", map[string]interface{}{
"DoSomething": DoSomething,
})
println("gopher bindings loaded")
}
func DoSomething() {
print("done!")
}
I then vendor gopherjs and try to do a gopherjs build. the command succeeds but the generated code fails as soon as it tries to use 'js.Global.Set' because of nil pointer.
If I then delete the vendor/ directory and rebuild everything works fine.
Is there something else I should be vendoring in order for this to work? Or what is the expected workflow?