{"action":"created","issue":{"url":"https://api.github.com/repos/l2isbad/go.d.plugin/issues/4","repository_url":"https://api.github.com/repos/l2isbad/go.d.plugin","labels_url":"https://api.github.com/repos/l2isbad/go.d.plugin/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/l2isbad/go.d.plugin/issues/4/comments","events_url":"https://api.github.com/repos/l2isbad/go.d.plugin/issues/4/events","html_url":"https://github.com/l2isbad/go.d.plugin/issues/4","id":342721573,"node_id":"MDU6SXNzdWUzNDI3MjE1NzM=","number":4,"title":"Go getter/setter naming rule","user":{"login":"Wing924","id":8895721,"node_id":"MDQ6VXNlcjg4OTU3MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/8895721?v=4","gravatar_id":"","url":"https://api.github.com/users/Wing924","html_url":"https://github.com/Wing924","followers_url":"https://api.github.com/users/Wing924/followers","following_url":"https://api.github.com/users/Wing924/following{/other_user}","gists_url":"https://api.github.com/users/Wing924/gists{/gist_id}","starred_url":"https://api.github.com/users/Wing924/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wing924/subscriptions","organizations_url":"https://api.github.com/users/Wing924/orgs","repos_url":"https://api.github.com/users/Wing924/repos","events_url":"https://api.github.com/users/Wing924/events{/privacy}","received_events_url":"https://api.github.com/users/Wing924/received_events","type":"User","site_admin":false},"labels":[{"id":998820495,"node_id":"MDU6TGFiZWw5OTg4MjA0OTU=","url":"https://api.github.com/repos/l2isbad/go.d.plugin/labels/not%20idiomatic","name":"not idiomatic","color":"cce871","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-07-19T13:10:37Z","updated_at":"2018-07-20T07:47:00Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"> Go doesn't provide automatic support for getters and setters. There's nothing wrong with providing getters and setters yourself, and it's often appropriate to do so, but it's neither idiomatic nor necessary to put Get into the getter's name. If you have a field called owner (lower case, unexported), the getter method should be called **Owner (upper case, exported), not GetOwner**. The use of upper-case names for export provides the hook to discriminate the field from the method. A setter function, if needed, will likely be called SetOwner.\r\n\r\n<https://golang.org/doc/effective_go.html#Getters>\r\n\r\nI found you use GetXXX for getter. This is not general in Go.\r\nex. https://github.com/l2isbad/go.d.plugin/blob/master/internal/modules/module.go#L26"},"comment":{"url":"https://api.github.com/repos/l2isbad/go.d.plugin/issues/comments/406517426","html_url":"https://github.com/l2isbad/go.d.plugin/issues/4#issuecomment-406517426","issue_url":"https://api.github.com/repos/l2isbad/go.d.plugin/issues/4","id":406517426,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjUxNzQyNg==","user":{"login":"Wing924","id":8895721,"node_id":"MDQ6VXNlcjg4OTU3MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/8895721?v=4","gravatar_id":"","url":"https://api.github.com/users/Wing924","html_url":"https://github.com/Wing924","followers_url":"https://api.github.com/users/Wing924/followers","following_url":"https://api.github.com/users/Wing924/following{/other_user}","gists_url":"https://api.github.com/users/Wing924/gists{/gist_id}","starred_url":"https://api.github.com/users/Wing924/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wing924/subscriptions","organizations_url":"https://api.github.com/users/Wing924/orgs","repos_url":"https://api.github.com/users/Wing924/repos","events_url":"https://api.github.com/users/Wing924/events{/privacy}","received_events_url":"https://api.github.com/users/Wing924/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T07:47:00Z","updated_at":"2018-07-20T07:47:00Z","author_association":"CONTRIBUTOR","body":"I think you're talking about here:\r\nhttps://github.com/l2isbad/go.d.plugin/blob/6a377df14c8050055bc32b57d9aa32589eb4c8b9/internal/modules/module.go#L23-L29\r\n\r\nIf you want to get list of names, I think `ListNames() []string` or `GetNames() []string` are better.\r\n\r\nI'm just starting reading the code, why you want to replace `GetCharts` with list name? It looks much different.\r\n\r\nBtw, in my personal opinion, a plural name like `Charts` refers to list of singular one.\r\nex.\r\n```go\r\ntype(\r\n    Chart struct{...}\r\n    Charts []Chart\r\n)\r\n```\r\n"}}
{"actor":{"display_login":"Wing924"}}