-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use Go idiomatic naming for Architecture consts #379
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC ghw/pkg/...
are also part of our public API?
A (unfortunately very quick) scan of the README seems inconclusive, even if admittedly top-level aliases are suggested most.
In any case, eventually we do report to users ghw.TopologyInfo.Architecture
which is filled using the new constants, so it seems we have a small annoying backward compatibility break here :\
ArchitectureSMP Architecture = iota | ||
// NUMA is a Non-Uniform Memory Access system | ||
ARCHITECTURE_NUMA | ||
ArchitectureNUMA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC we do allow importing sub-packages (import github.com/jaypipes/ghw/pkg/topology
) and these are part of the public API. If so we need the backward compatibility also here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, makes sense. I'll add the pkg/-specific old names back in, with deprecation warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
Updates the `ARCHITECTURE_SMP` and `ARCHITECTURE_NUMA` constants to `ArchitectureSMP` and `ArchitectureNUMA`, respectively, to align with idiomatic Go naming conventions. For backwards-compat, keeps `ARCHITECTURE_SMP` and `ARCHITECTURE_NUMA` in the aliased variables for a few releases. These will be discarded when we cut a v1.0 series. Signed-off-by: Jay Pipes <jaypipes@gmail.com>
Thanks @jaypipes I think this is the best we can do atm. |
Updates the
ARCHITECTURE_SMP
andARCHITECTURE_NUMA
constants toArchitectureSMP
andArchitectureNUMA
, respectively, to align with idiomatic Go naming conventions.For backwards-compat, keeps
ARCHITECTURE_SMP
andARCHITECTURE_NUMA
in the aliased variables for a few releases. These will be discarded when we cut a v1.0 series.