Git Product home page Git Product logo

gogen's Introduction

Hi there ๐Ÿ‘‹

lwhile's code::stats stats lwhile's GitHub stats
Top Langs

gogen's People

Contributors

lwhile avatar

Stargazers

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

Watchers

 avatar  avatar

gogen's Issues

Can't convert json

Open browser and paste JSON data to editor, but browser pop up alert windows

time="2017-11-05T07:10:21Z" level=info msg="Use web mode" source="cmd.go:40"
time="2017-11-05T07:10:21Z" level=info msg="Starting web server and listen at port 4928" source="cmd.go:87"
time="2017-11-05T07:10:40Z" level=error msg="invalid character 'รจ' looking for beginning of value" source="handler.go:31"

http: panic serving 127.0.0.1:34200: runtime error: index out of range

goroutine 20 [running]:
net/http.(*conn).serve.func1(0xc4203626e0)
	/usr/local/go/src/net/http/server.go:1721 +0xd0
panic(0x79a9c0, 0xa17540)
	/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/lwhile/gogen.(*jsonParser).parse(0xc42036a680, 0xc4204be100, 0xc420405ce0, 0x768940, 0xc42036a698)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:76 +0x46f
github.com/lwhile/gogen.(*jsonParser).Parse(0xc42036a680, 0xc42036a680, 0xc420436000)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:59 +0x120
github.com/lwhile/gogen.genStruct(0x9f3440, 0xc42038e540, 0xc42006ef00)
	/usr/local/go/src/github.com/lwhile/gogen/handler.go:30 +0x274
net/http.HandlerFunc.ServeHTTP(0x85f4e8, 0x9f3440, 0xc42038e540, 0xc42006ef00)
	/usr/local/go/src/net/http/server.go:1942 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc4203483c0, 0x9f3440, 0xc42038e540, 0xc42006ef00)
	/usr/local/go/src/github.com/gorilla/mux/mux.go:132 +0x101
net/http.serverHandler.ServeHTTP(0xc420320bb0, 0x9f3440, 0xc42038e540, 0xc42006ed00)
	/usr/local/go/src/net/http/server.go:2568 +0x92
net/http.(*conn).serve(0xc4203626e0, 0x9f3a40, 0xc420370140)
	/usr/local/go/src/net/http/server.go:1825 +0x612
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2668 +0x2ce
2017/11/05 15:59:58 http: panic serving 127.0.0.1:34201: runtime error: index out of range
goroutine 3 [running]:
net/http.(*conn).serve.func1(0xc420374000)
	/usr/local/go/src/net/http/server.go:1721 +0xd0
panic(0x79a9c0, 0xa17540)
	/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/lwhile/gogen.(*jsonParser).parse(0xc42007e000, 0xc42007ce80, 0xc42007b320, 0xa3e968, 0x0)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:76 +0x46f
github.com/lwhile/gogen.(*jsonParser).parse(0xc42007e000, 0xc42007ce40, 0xc42007b2f0, 0xa3e968, 0x0)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:93 +0x253
github.com/lwhile/gogen.(*jsonParser).parse(0xc42007e000, 0xc42007ce00, 0xc42007b290, 0x768940, 0xc42007e018)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:93 +0x253
github.com/lwhile/gogen.(*jsonParser).Parse(0xc42007e000, 0xc42007e000, 0xc420414000)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:59 +0x120
github.com/lwhile/gogen.genStruct(0x9f3440, 0xc42015c0e0, 0xc4204c4400)
	/usr/local/go/src/github.com/lwhile/gogen/handler.go:30 +0x274
net/http.HandlerFunc.ServeHTTP(0x85f4e8, 0x9f3440, 0xc42015c0e0, 0xc4204c4400)
	/usr/local/go/src/net/http/server.go:1942 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc4203483c0, 0x9f3440, 0xc42015c0e0, 0xc4204c4400)
	/usr/local/go/src/github.com/gorilla/mux/mux.go:132 +0x101
net/http.serverHandler.ServeHTTP(0xc420320bb0, 0x9f3440, 0xc42015c0e0, 0xc42000a600)
	/usr/local/go/src/net/http/server.go:2568 +0x92
net/http.(*conn).serve(0xc420374000, 0x9f3a40, 0xc420012580)
	/usr/local/go/src/net/http/server.go:1825 +0x612
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2668 +0x2ce
2017/11/05 15:59:58 http: panic serving 127.0.0.1:34202: runtime error: index out of range
goroutine 4 [running]:
net/http.(*conn).serve.func1(0xc4203740a0)
	/usr/local/go/src/net/http/server.go:1721 +0xd0
panic(0x79a9c0, 0xa17540)
	/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/lwhile/gogen.(*jsonParser).parse(0xc42007e0d0, 0xc42007dac0, 0xc420195800, 0x768940, 0xc42007e0e8)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:76 +0x46f
github.com/lwhile/gogen.(*jsonParser).Parse(0xc42007e0d0, 0xc42007e0d0, 0xc420116000)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:59 +0x120
github.com/lwhile/gogen.genStruct(0x9f3440, 0xc42015c380, 0xc4204c4900)
	/usr/local/go/src/github.com/lwhile/gogen/handler.go:30 +0x274
net/http.HandlerFunc.ServeHTTP(0x85f4e8, 0x9f3440, 0xc42015c380, 0xc4204c4900)
	/usr/local/go/src/net/http/server.go:1942 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc4203483c0, 0x9f3440, 0xc42015c380, 0xc4204c4900)
	/usr/local/go/src/github.com/gorilla/mux/mux.go:132 +0x101
net/http.serverHandler.ServeHTTP(0xc420320bb0, 0x9f3440, 0xc42015c380, 0xc42000a500)
	/usr/local/go/src/net/http/server.go:2568 +0x92
net/http.(*conn).serve(0xc4203740a0, 0x9f3a40, 0xc420012400)
	/usr/local/go/src/net/http/server.go:1825 +0x612
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2668 +0x2ce
2017/11/05 15:59:58 http: panic serving 127.0.0.1:34203: runtime error: index out of range
goroutine 5 [running]:
net/http.(*conn).serve.func1(0xc420374140)
	/usr/local/go/src/net/http/server.go:1721 +0xd0
panic(0x79a9c0, 0xa17540)
	/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/lwhile/gogen.(*jsonParser).parse(0xc42036a000, 0xc42019cd40, 0xc4202102a0, 0x768940, 0xc42036a018)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:76 +0x46f
github.com/lwhile/gogen.(*jsonParser).Parse(0xc42036a000, 0xc42036a000, 0xc420518000)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:59 +0x120
github.com/lwhile/gogen.genStruct(0x9f3440, 0xc4201c20e0, 0xc42046e200)
	/usr/local/go/src/github.com/lwhile/gogen/handler.go:30 +0x274
net/http.HandlerFunc.ServeHTTP(0x85f4e8, 0x9f3440, 0xc4201c20e0, 0xc42046e200)
	/usr/local/go/src/net/http/server.go:1942 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc4203483c0, 0x9f3440, 0xc4201c20e0, 0xc42046e200)
	/usr/local/go/src/github.com/gorilla/mux/mux.go:132 +0x101
net/http.serverHandler.ServeHTTP(0xc420320bb0, 0x9f3440, 0xc4201c20e0, 0xc42000a800)
	/usr/local/go/src/net/http/server.go:2568 +0x92
net/http.(*conn).serve(0xc420374140, 0x9f3a40, 0xc420012980)
	/usr/local/go/src/net/http/server.go:1825 +0x612
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2668 +0x2ce
2017/11/05 15:59:58 http: panic serving 127.0.0.1:34204: runtime error: index out of range
goroutine 6 [running]:
net/http.(*conn).serve.func1(0xc4203741e0)
	/usr/local/go/src/net/http/server.go:1721 +0xd0
panic(0x79a9c0, 0xa17540)
	/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/lwhile/gogen.(*jsonParser).parse(0xc42036a1a0, 0xc4201ea980, 0xc42025e5a0, 0x768940, 0xc42036a1b8)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:76 +0x46f
github.com/lwhile/gogen.(*jsonParser).Parse(0xc42036a1a0, 0xc42036a1a0, 0xc4205a2000)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:59 +0x120
github.com/lwhile/gogen.genStruct(0x9f3440, 0xc4201c21c0, 0xc42046e700)
	/usr/local/go/src/github.com/lwhile/gogen/handler.go:30 +0x274
net/http.HandlerFunc.ServeHTTP(0x85f4e8, 0x9f3440, 0xc4201c21c0, 0xc42046e700)
	/usr/local/go/src/net/http/server.go:1942 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc4203483c0, 0x9f3440, 0xc4201c21c0, 0xc42046e700)
	/usr/local/go/src/github.com/gorilla/mux/mux.go:132 +0x101
net/http.serverHandler.ServeHTTP(0xc420320bb0, 0x9f3440, 0xc4201c21c0, 0xc42000a700)
	/usr/local/go/src/net/http/server.go:2568 +0x92
net/http.(*conn).serve(0xc4203741e0, 0x9f3a40, 0xc420012800)
	/usr/local/go/src/net/http/server.go:1825 +0x612
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2668 +0x2ce
2017/11/05 15:59:58 http: panic serving 127.0.0.1:34232: runtime error: index out of range
goroutine 29 [running]:
net/http.(*conn).serve.func1(0xc4200aa640)
	/usr/local/go/src/net/http/server.go:1721 +0xd0
panic(0x79a9c0, 0xa17540)
	/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/lwhile/gogen.(*jsonParser).parse(0xc42007e000, 0xc4201eb980, 0xc42022ec30, 0xa3e968, 0x0)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:76 +0x46f
github.com/lwhile/gogen.(*jsonParser).parse(0xc42007e000, 0xc4201eb900, 0xc42022ec00, 0x768940, 0xc42007e018)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:93 +0x253
github.com/lwhile/gogen.(*jsonParser).Parse(0xc42007e000, 0xc42007e000, 0xc4204c8000)
	/usr/local/go/src/github.com/lwhile/gogen/parser.go:59 +0x120
github.com/lwhile/gogen.genStruct(0x9f3440, 0xc42015c0e0, 0xc4204c4600)
	/usr/local/go/src/github.com/lwhile/gogen/handler.go:30 +0x274
net/http.HandlerFunc.ServeHTTP(0x85f4e8, 0x9f3440, 0xc42015c0e0, 0xc4204c4600)
	/usr/local/go/src/net/http/server.go:1942 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc4203483c0, 0x9f3440, 0xc42015c0e0, 0xc4204c4600)
	/usr/local/go/src/github.com/gorilla/mux/mux.go:132 +0x101
net/http.serverHandler.ServeHTTP(0xc420320bb0, 0x9f3440, 0xc42015c0e0, 0xc4204c4400)
	/usr/local/go/src/net/http/server.go:2568 +0x92
net/http.(*conn).serve(0xc4200aa640, 0x9f3a40, 0xc4201eaac0)
	/usr/local/go/src/net/http/server.go:1825 +0x612
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2668 +0x2ce

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.