{"action":"created","issue":{"url":"https://api.github.com/repos/nsf/gocode/issues/373","repository_url":"https://api.github.com/repos/nsf/gocode","labels_url":"https://api.github.com/repos/nsf/gocode/issues/373/labels{/name}","comments_url":"https://api.github.com/repos/nsf/gocode/issues/373/comments","events_url":"https://api.github.com/repos/nsf/gocode/issues/373/events","html_url":"https://github.com/nsf/gocode/issues/373","id":173909083,"number":373,"title":"Bug: kubernetes client does not complete","user":{"login":"ghodss","id":5209643,"avatar_url":"https://avatars.githubusercontent.com/u/5209643?v=3","gravatar_id":"","url":"https://api.github.com/users/ghodss","html_url":"https://github.com/ghodss","followers_url":"https://api.github.com/users/ghodss/followers","following_url":"https://api.github.com/users/ghodss/following{/other_user}","gists_url":"https://api.github.com/users/ghodss/gists{/gist_id}","starred_url":"https://api.github.com/users/ghodss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghodss/subscriptions","organizations_url":"https://api.github.com/users/ghodss/orgs","repos_url":"https://api.github.com/users/ghodss/repos","events_url":"https://api.github.com/users/ghodss/events{/privacy}","received_events_url":"https://api.github.com/users/ghodss/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,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-30T01:21:55Z","updated_at":"2016-09-03T11:17:11Z","closed_at":null,"body":"With this program:\r\n\r\n```\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\r\n\t\"k8s.io/client-go/1.4/kubernetes\"\r\n\t\"k8s.io/client-go/1.4/rest\"\r\n)\r\n\r\nfunc main() {\r\n\tkc, err := kubernetes.NewForConfig(&rest.Config{\r\n\t\tHost: \"http://10.1.2.3:8080\",\r\n\t})\r\n\tif err != nil {\r\n\t\tfmt.Println(err)\r\n\t}\r\n\tkc.Core(). // <-- completion does not work here\r\n}\r\n```\r\n\r\nThe library this refers to is at https://github.com/kubernetes/client-go/."},"comment":{"url":"https://api.github.com/repos/nsf/gocode/issues/comments/244540864","html_url":"https://github.com/nsf/gocode/issues/373#issuecomment-244540864","issue_url":"https://api.github.com/repos/nsf/gocode/issues/373","id":244540864,"user":{"login":"zchee","id":6366270,"avatar_url":"https://avatars.githubusercontent.com/u/6366270?v=3","gravatar_id":"","url":"https://api.github.com/users/zchee","html_url":"https://github.com/zchee","followers_url":"https://api.github.com/users/zchee/followers","following_url":"https://api.github.com/users/zchee/following{/other_user}","gists_url":"https://api.github.com/users/zchee/gists{/gist_id}","starred_url":"https://api.github.com/users/zchee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zchee/subscriptions","organizations_url":"https://api.github.com/users/zchee/orgs","repos_url":"https://api.github.com/users/zchee/repos","events_url":"https://api.github.com/users/zchee/events{/privacy}","received_events_url":"https://api.github.com/users/zchee/received_events","type":"User","site_admin":false},"created_at":"2016-09-03T11:17:11Z","updated_at":"2016-09-03T11:17:11Z","body":"@ghodss @nsf \r\nI debug it.\r\nYes, it seems related to import alias.\r\n\r\nIn https://github.com/kubernetes/client-go/blob/master/1.4/kubernetes/typed/core/v1/componentstatus.go,\r\n\r\n```go\r\npackage v1\r\n\r\nimport (\r\n\tapi \"k8s.io/client-go/1.4/pkg/api\"\r\n\tv1 \"k8s.io/client-go/1.4/pkg/api/v1\"\r\n\twatch \"k8s.io/client-go/1.4/pkg/watch\"\r\n)\r\n```\r\n\r\npackage name is `v1`, also import `k8s.io/client-go/1.4/pkg/api/v1` with `v1` alias.\r\nI'm surprised to be able to compile.\r\n\r\nFYI, if rename\r\n`k8s.io/client-go/1.4/kubernetes/typed/core/v1`\r\nto\r\n`k8s.io/client-go/1.4/kubernetes/typed/core/corev1`\r\n```\r\nrep \"package v1\" $GOPATH/src/k8s.io/client-go/1.4/kubernetes/typed/core/v1/*.go -l | xargs sed -i \"s/package v1/package corev1/\"\r\n```\r\ngocode will works fine.\r\n\r\nSo, maybe override package methods in this? (sorry, I don't know)\r\nhttps://github.com/nsf/gocode/blob/master/package_bin.go#L168-L170\r\n\r\nI hope that helps."}}
{"actor":{"display_login":"zchee"}}