{"action":"created","issue":{"url":"https://api.github.com/repos/nsf/gocode/issues/298","labels_url":"https://api.github.com/repos/nsf/gocode/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/nsf/gocode/issues/298/comments","events_url":"https://api.github.com/repos/nsf/gocode/issues/298/events","html_url":"https://github.com/nsf/gocode/issues/298","id":103234152,"number":298,"title":"Gocode showing panic as the only completion","user":{"login":"Immortalin","id":7126128,"avatar_url":"https://avatars.githubusercontent.com/u/7126128?v=3","gravatar_id":"","url":"https://api.github.com/users/Immortalin","html_url":"https://github.com/Immortalin","followers_url":"https://api.github.com/users/Immortalin/followers","following_url":"https://api.github.com/users/Immortalin/following{/other_user}","gists_url":"https://api.github.com/users/Immortalin/gists{/gist_id}","starred_url":"https://api.github.com/users/Immortalin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Immortalin/subscriptions","organizations_url":"https://api.github.com/users/Immortalin/orgs","repos_url":"https://api.github.com/users/Immortalin/repos","events_url":"https://api.github.com/users/Immortalin/events{/privacy}","received_events_url":"https://api.github.com/users/Immortalin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nsf/gocode/labels/Bug","name":"Bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-26T10:38:39Z","updated_at":"2015-08-26T10:48:55Z","closed_at":null,"body":"I am using gocode with the spacemacs-go contribution layer. Compiler verson is Go 1.4. Gocode is showing panic as the only completion.\r\n\r\nHere's the log:\r\n\r\n```\r\npackage main\r\n\r\nimport (\r\n\t\"database/sql\"\r\n\t\"github.com/codegangsta/negroni\"\r\n\t\"github.com/julienschmidt/httprouter\"\r\n\t_ \"github.com/mattn/go-sqlite3\"\r\n\t\"github.com/unrolled/render\"\r\n\t\"golang.org/x/crypto/bcrypt\"\r\n\t\"log\"\r\n\t\"net/http\"\r\n)\r\n\r\ntype Book struct {\r\n\t// ISBN     string\r\n\tTitle    string\r\n\tAuthor   string\r\n\tPrice    float32\r\n\tLocation string\r\n}\r\n\r\ntype Env struct {\r\n\tdb *sql.DB\r\n\tdb#\r\n}\r\n\r\nfunc SetupDB() *sql.DB {\r\n\tdb, err := sql.Open(\"sqlite3\", \"database.sqlite\") //TODO: implement SSL\r\n\tPanicIf(err, \"SetupDB\")\r\n\treturn db\r\n}\r\n\r\nfunc main() {\r\n\tlog.Println(\"Hello World\")\r\n\tdb := SetupDB\r\n\tn := negroni.Classic()\r\n\trouter := httprouter.New()\r\n\tren := render.New(render.Options{\r\n\t\tExtensions: []string{\".html\"},\r\n\t})\r\n\trouter.POST(\"/login\", db.LoginHandler)\r\n\tn.UseHandler(router)\r\n\tn.Run(\":3001\")\r\n\r\n}\r\n\r\nfunc (db *sql.DB) LoginHandler(resp http.ResponseWriter, req *http.Request, p httprouter.Params) {\r\n\temail := req.FormValue(\"email\")\r\n\tpassword := req.FormValue(\"password\")\r\n\tlog.Println(email, password)\r\n\r\n}\r\n\r\nfunc PanicIf(err error, errorMsg string) {\r\n\tif err != nil {\r\n\t\tlog.Println(\"Error at \"+errorMsg+\":\", err)\r\n\t\tpanic(err)\r\n\t}\r\n}\r\n\r\nfunc LogError(err error, errorMsg string) {\r\n\tif err != nil {\r\n\t\tlog.Println(\"Error at \"+errorMsg+\":\", err)\r\n\t}\r\n}\r\n2015/08/26 18:38:01 -------------------------------------------------------\r\n2015/08/26 18:38:01 Found \"database/sql\" at \"/usr/local/go/pkg/linux_386/database/sql.a\"\r\n2015/08/26 18:38:01 Found \"github.com/codegangsta/negroni\" at \"/home/immortalin/Development/Go/pkg/linux_386/github.com/codegangsta/negroni.a\"\r\n2015/08/26 18:38:01 Found \"github.com/julienschmidt/httprouter\" at \"/home/immortalin/Development/Go/pkg/linux_386/github.com/julienschmidt/httprouter.a\"\r\n2015/08/26 18:38:01 Found \"github.com/mattn/go-sqlite3\" at \"/home/immortalin/Development/Go/pkg/linux_386/github.com/mattn/go-sqlite3.a\"\r\n2015/08/26 18:38:01 Found \"github.com/unrolled/render\" at \"/home/immortalin/Development/Go/pkg/linux_386/github.com/unrolled/render.a\"\r\n2015/08/26 18:38:01 Found \"golang.org/x/crypto/bcrypt\" at \"/home/immortalin/Development/Go/pkg/linux_386/golang.org/x/crypto/bcrypt.a\"\r\n2015/08/26 18:38:01 Found \"log\" at \"/usr/local/go/pkg/linux_386/log.a\"\r\n2015/08/26 18:38:01 Found \"net/http\" at \"/usr/local/go/pkg/linux_386/net/http.a\"\r\npanic: interface conversion: ast.Expr is *ast.SelectorExpr, not *ast.Ident\r\n1(runtime.call16): /usr/local/go/src/runtime/asm_386.s:412\r\n2(runtime.gopanic): /usr/local/go/src/runtime/panic.go:387\r\n3(runtime.assertI2T): /usr/local/go/src/runtime/iface.go:181\r\n4(main.method_of): /home/immortalin/Development/Go/src/github.com/nsf/gocode/decl.go:327\r\n5(main.func·009): /home/immortalin/Development/Go/src/github.com/nsf/gocode/declcache.go:128\r\n6(main.foreach_decl): /home/immortalin/Development/Go/src/github.com/nsf/gocode/decl.go:1309\r\n7(main.append_to_top_decls): /home/immortalin/Development/Go/src/github.com/nsf/gocode/declcache.go:147\r\n8(main.(*auto_complete_file).process_data): /home/immortalin/Development/Go/src/github.com/nsf/gocode/autocompletefile.go:75\r\n9(main.(*auto_complete_context).apropos): /home/immortalin/Development/Go/src/github.com/nsf/gocode/autocompletecontext.go:247\r\n10(main.server_auto_complete): /home/immortalin/Development/Go/src/github.com/nsf/gocode/server.go:155\r\n11(main.(*RPC).RPC_auto_complete): /home/immortalin/Development/Go/src/github.com/nsf/gocode/rpc.go:26\r\n12(runtime.call32): /usr/local/go/src/runtime/asm_386.s:413\r\n13(reflect.Value.call): /usr/local/go/src/reflect/value.go:419\r\n14(reflect.Value.Call): /usr/local/go/src/reflect/value.go:296\r\n15(net/rpc.(*service).call): /usr/local/go/src/net/rpc/server.go:382\r\n16(runtime.goexit): /usr/local/go/src/runtime/asm_386.s:2287\r\n```"},"comment":{"url":"https://api.github.com/repos/nsf/gocode/issues/comments/134943976","html_url":"https://github.com/nsf/gocode/issues/298#issuecomment-134943976","issue_url":"https://api.github.com/repos/nsf/gocode/issues/298","id":134943976,"user":{"login":"Immortalin","id":7126128,"avatar_url":"https://avatars.githubusercontent.com/u/7126128?v=3","gravatar_id":"","url":"https://api.github.com/users/Immortalin","html_url":"https://github.com/Immortalin","followers_url":"https://api.github.com/users/Immortalin/followers","following_url":"https://api.github.com/users/Immortalin/following{/other_user}","gists_url":"https://api.github.com/users/Immortalin/gists{/gist_id}","starred_url":"https://api.github.com/users/Immortalin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Immortalin/subscriptions","organizations_url":"https://api.github.com/users/Immortalin/orgs","repos_url":"https://api.github.com/users/Immortalin/repos","events_url":"https://api.github.com/users/Immortalin/events{/privacy}","received_events_url":"https://api.github.com/users/Immortalin/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T10:48:55Z","updated_at":"2015-08-26T10:48:55Z","body":"@nsf gocode is working perfectly when I use Sublime Text 3 with its built in binary, it's only broken on Emacs."}}