apm-server icon indicating copy to clipboard operation
apm-server copied to clipboard

Rename GetProcessors to Processors in registry

Open nexthack opened this issue 9 years ago • 6 comments

The name GetProcessors sounds more like a java getter and might not be idiomatic go.For reference this and this.

The method GetProcessors can be renamed to Processors and GetProcessor to Processor.

I can make this change if you think this is sensible.

P.S : Currently the methods on the register are not doing any work.They look like java pojos.

nexthack avatar Aug 20 '17 21:08 nexthack

For me it doesn't matter too much if we call it GetProcessors or Processors. Both works. Let's see what the rest of the team thinks.

For the empty registry functions: HereI think it's important that we keep it as I could see additional logic in it in the future so if we add any, we don't have to change the rest of the code. Also it allows us to keep the variables private. But I'm aware this is personal preference :-)

ruflin avatar Aug 21 '17 06:08 ruflin

Yes,this might not be a breaking change.But as the project is in its initial phases if we follow go conventions it helps in thinking in terms of go idioms and will help future design as well.

nexthack avatar Aug 21 '17 20:08 nexthack

+1 on following to conventions (most of the time ;-) ). Feel free to open a PR with the change, then also the rest of the team can get involved in reviewing it.

ruflin avatar Aug 22 '17 07:08 ruflin

@ruflin kool.

nexthack avatar Aug 22 '17 19:08 nexthack

I'd appreciate to see this changed, looking forward to the PR.

simitt avatar Aug 23 '17 08:08 simitt

I also prefer to avoid java-ish Get* / Set* / New* lingo 👍

jalvz avatar Aug 23 '17 08:08 jalvz