- Add new function to ValueType conversion - Add more docs to functions and minor changes - rename entry to module - don't expose Value and Env structs. Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
16 lines
317 B
Go
16 lines
317 B
Go
package main
|
|
|
|
import (
|
|
"sirherobrine23.com.br/Sirherobrine23/napi-go"
|
|
entry "sirherobrine23.com.br/Sirherobrine23/napi-go/module/binding"
|
|
)
|
|
|
|
func init() {
|
|
entry.Register(func(env napi.EnvType, export *napi.Object) {
|
|
str, _ := napi.CreateString(env, "from golang")
|
|
export.Set("from", str)
|
|
})
|
|
}
|
|
|
|
func main() {}
|