kristiehoward / go2flow Goto Github PK
View Code? Open in Web Editor NEWA Go program that generates Flow (JS) type definitions given Go struct definitions
A Go program that generates Flow (JS) type definitions given Go struct definitions
When invoking go2flow with an embedded/anonymous struct go2flow panics with a nil pointer error.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x506b57]
goroutine 1 [running]:
github.com/kristiehoward/go2flow/handlers.handleField(0x0, 0x0, 0x0, 0x0, 0x5c1a00, 0xc4200a51e0, 0x0, 0x0)
/home/vagrant/.go/src/github.com/kristiehoward/go2flow/handlers/handlers.go:11 +0x37
github.com/kristiehoward/go2flow/handlers.HandleTypeDef(0x0, 0xc4200a51c0, 0x0, 0x5c1e40, 0xc4200a5740, 0x0)
/home/vagrant/.go/src/github.com/kristiehoward/go2flow/handlers/handlers.go:66 +0x13e
main.TypeDefInspector(0x5c11c0, 0xc42008e900, 0xc42008a601)
/home/vagrant/.go/src/github.com/kristiehoward/go2flow/main.go:39 +0x62
go/ast.inspector.Visit(0x5ab750, 0x5c11c0, 0xc42008e900, 0x5bffe0, 0x5ab750)
/usr/local/go/src/go/ast/walk.go:373 +0x3a
go/ast.Walk(0x5bffe0, 0x5ab750, 0x5c11c0, 0xc42008e900)
/usr/local/go/src/go/ast/walk.go:52 +0x66
go/ast.Walk(0x5bffe0, 0x5ab750, 0x5c0c00, 0xc4200bcc00)
/usr/local/go/src/go/ast/walk.go:331 +0xf2f
go/ast.walkDeclList(0x5bffe0, 0x5ab750, 0xc4200be400, 0x19, 0x20)
/usr/local/go/src/go/ast/walk.go:38 +0x81
go/ast.Walk(0x5bffe0, 0x5ab750, 0x5c0ac0, 0xc4200d8280)
/usr/local/go/src/go/ast/walk.go:353 +0x2650
go/ast.Inspect(0x5c0ac0, 0xc4200d8280, 0x5ab750)
/usr/local/go/src/go/ast/walk.go:385 +0x4b
main.handleFile(0x7ffe5d0be577, 0xc, 0x3, 0x0)
/home/vagrant/.go/src/github.com/kristiehoward/go2flow/main.go:52 +0xb5
main.run(0xc4200b4160, 0xc4200b4160, 0xc420047d27)
/home/vagrant/.go/src/github.com/kristiehoward/go2flow/main.go:84 +0x211
github.com/kristiehoward/go2flow/vendor/github.com/urfave/cli.HandleAction(0x569300, 0x5ab758, 0xc4200b4160, 0xc4200b0060, 0x0)
/home/vagrant/.go/src/github.com/kristiehoward/go2flow/vendor/github.com/urfave/cli/app.go:502 +0xc8
github.com/kristiehoward/go2flow/vendor/github.com/urfave/cli.(*App).Run(0xc4200ca000, 0xc42008e060, 0x3, 0x3, 0x0, 0x0)
/home/vagrant/.go/src/github.com/kristiehoward/go2flow/vendor/github.com/urfave/cli/app.go:268 +0x60c
main.main()
/home/vagrant/.go/src/github.com/kristiehoward/go2flow/main.go:100 +0x131
example with custom suffix API
:
// Before
export type Publisher = { ... }
// After
export type PublisherAPI = { ... }
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.