{"action":"opened","issue":{"url":"https://api.github.com/repos/joefitzgerald/autocomplete-go/issues/49","repository_url":"https://api.github.com/repos/joefitzgerald/autocomplete-go","labels_url":"https://api.github.com/repos/joefitzgerald/autocomplete-go/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/joefitzgerald/autocomplete-go/issues/49/comments","events_url":"https://api.github.com/repos/joefitzgerald/autocomplete-go/issues/49/events","html_url":"https://github.com/joefitzgerald/autocomplete-go/issues/49","id":174059783,"number":49,"title":"No suggestions are made, type signatures are still shown.","user":{"login":"LeoAdamek","id":535928,"avatar_url":"https://avatars.githubusercontent.com/u/535928?v=3","gravatar_id":"","url":"https://api.github.com/users/LeoAdamek","html_url":"https://github.com/LeoAdamek","followers_url":"https://api.github.com/users/LeoAdamek/followers","following_url":"https://api.github.com/users/LeoAdamek/following{/other_user}","gists_url":"https://api.github.com/users/LeoAdamek/gists{/gist_id}","starred_url":"https://api.github.com/users/LeoAdamek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeoAdamek/subscriptions","organizations_url":"https://api.github.com/users/LeoAdamek/orgs","repos_url":"https://api.github.com/users/LeoAdamek/repos","events_url":"https://api.github.com/users/LeoAdamek/events{/privacy}","received_events_url":"https://api.github.com/users/LeoAdamek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-30T16:04:52Z","updated_at":"2016-08-30T16:04:52Z","closed_at":null,"body":"### Prerequisites\r\n\r\n* [x] Have you run `go get -u github.com/nsf/gocode` (emphasis on the `-u` flag)?\r\n* [x] Have you tried launching `atom .` from the terminal in your project's directory?\r\n* [x] Have you verified the output from `go env` is correct? If it is, please include the output in this \r\nissue.\r\n\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"linux\"\r\nGOOS=\"linux\"\r\nGOPATH=\"/home/leo/development/projects/go\"\r\nGORACE=\"\"\r\nGOROOT=\"/usr/lib/go\"\r\nGOTOOLDIR=\"/usr/lib/go/pkg/tool/linux_amd64\"\r\nCC=\"gcc\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build498199209=/tmp/go-build -gno-record-gcc-switches\"\r\nCXX=\"g++\"\r\nCGO_ENABLED=\"1\"\r\n\r\n* [x] Are you running the latest version of Atom? Have you tried [Atom Beta](https://atom.io/beta), which can be run side-by-side with Atom Stable?\r\n\r\n> Atom 1.9.9\r\n\r\n* [x] Have you updated your Atom packages?\r\n* [x] Have you run `gocode` in server debug mode? In your terminal:\r\n  - Run `gocode close`\r\n  - Run `gocode -s -debug`\r\n  - Type in atom\r\n  - Please include some debug output from gocode\r\n```\r\n2016/08/30 17:01:15 =======================================================\r\n2016/08/30 17:01:16 Go project path: bitbucket.org/mr-zen/tzapi/routes\r\n2016/08/30 17:01:16 Got autocompletion request for '/home/leo/development/projects/go/src/bitbucket.org/mr-zen/tzapi/routes/ugc.go'\r\n2016/08/30 17:01:16 Cursor at: 603\r\n2016/08/30 17:01:16 -------------------------------------------------------\r\npackage routes\r\n\r\nimport (\r\n        \"net/http\"\r\n        \"strconv\"\r\n\r\n        \"bitbucket.org/mr-zen/tzapi/db\"\r\n\r\n        \"github.com/gorilla/mux\"\r\n)\r\n\r\n// UGCRouter is the RESTful resource\r\ntype UGCRouter struct{}\r\n\r\n// Route given a subrouter will setup routes for the resource\r\nfunc (u UGCRouter) Route(r *mux.Router) {\r\n        r.HandleFunc(\"/stats\", u.Stats).Methods(http.MethodGet)\r\n}\r\n\r\n// Stats gets the statisics for review scores from UGC\r\nfunc (u UGCRouter) Stats(w http.ResponseWriter, r *http.Request) {\r\n        var ugc []db.UGCItem\r\n        var count uint64\r\n        var totalScore uint64\r\n        query := db.UGCItem{State: 1}\r\n\r\n        scoreBuckets := make(map[uint64]uint64)\r\n\r\n        r.URL#()\r\n\r\n        // Get the global stats.\r\n        db.GetConnection().Select(\"id, metadata\").Where(query).Find(&ugc)\r\n\r\n        for _, i := range ugc {\r\n                if i.Meta[\"rating\"] != nil {\r\n                        rating, err := strconv.ParseUint(i.Meta[\"rating\"].(string), 10, 64)\r\n                        if err == nil && rating > 0 {\r\n                                count++\r\n                                totalScore += rating\r\n                        }\r\n\r\n                        scoreBuckets[rating]++\r\n                }\r\n        }\r\n\r\n        avgScore := float64(totalScore) / float64(count)\r\n\r\n        respondJSON(w, map[string]interface{}{\r\n                \"count\":         count,\r\n                \"total_score\":   totalScore,\r\n                \"avg_score\":     avgScore,\r\n                \"score_buckets\": scoreBuckets,\r\n        }, http.StatusOK)\r\n\r\n        return\r\n}\r\n2016/08/30 17:01:16 -------------------------------------------------------\r\n2016/08/30 17:01:16 Found \"net/http\" at \"/usr/lib/go/pkg/linux_amd64/net/http.a\"\r\n2016/08/30 17:01:16 Found \"strconv\" at \"/usr/lib/go/pkg/linux_amd64/strconv.a\"\r\n2016/08/30 17:01:16 Found \"bitbucket.org/mr-zen/tzapi/db\" at \"/home/leo/development/projects/go/pkg/linux_amd64/bitbucket.org/mr-zen/tzapi/db.a\"\r\n2016/08/30 17:01:16 Found \"github.com/gorilla/mux\" at \"/home/leo/development/projects/go/pkg/linux_amd64/github.com/gorilla/mux.a\"\r\n2016/08/30 17:01:16 Error parsing input file (inner block):\r\n2016/08/30 17:01:16  12:9: expected operand, found ')'\r\n2016/08/30 17:01:16  17:2: expected ')', found 'for'\r\n2016/08/30 17:01:16  17:6: expected ';', found 'IDENT' _\r\n2016/08/30 17:01:16  29:2: expected declaration, found 'IDENT' avgScore\r\n2016/08/30 17:01:16 extracted expression tokens: r\r\n2016/08/30 17:01:16 Offset: 3\r\n2016/08/30 17:01:16 Number of candidates found: 1\r\n2016/08/30 17:01:16 Candidates are:\r\n2016/08/30 17:01:16   var URL *url.URL\r\n2016/08/30 17:01:16 =======================================================\r\n```\r\n\r\n\r\n### Description\r\nNo completion suggestions are shown by autocomplete-go, although some information about type signatures is shown\r\n\r\n### Output From `go env`\r\n\r\n```\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"linux\"\r\nGOOS=\"linux\"\r\nGOPATH=\"/home/leo/development/projects/go\"\r\nGORACE=\"\"\r\nGOROOT=\"/usr/lib/go\"\r\nGOTOOLDIR=\"/usr/lib/go/pkg/tool/linux_amd64\"\r\nCC=\"gcc\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build498199209=/tmp/go-build -gno-record-gcc-switches\"\r\nCXX=\"g++\"\r\nCGO_ENABLED=\"1\"\r\n\r\n```\r\n\r\n### Steps to Reproduce\r\n\r\n\r\n1. Have a function with a parameter which is an `*http.Request`\r\n2. Start typing <kbd>U</kbd>\r\n\r\n\r\n### Expected Behavior\r\n\r\nAn `*http.Request` should suggest `URL` which in turns suggests `Query`\r\n\r\n### Actual Behavior\r\n\r\nNo suggestions are made.\r\n"}}
{"actor":{"display_login":"LeoAdamek"}}