You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are cpu.HWCap and cpu.HWCap2 supposed to be exported as part of the cpu API? I can't see any discussion about this in CL 150718 where they were added. Presumably they should be properly documented if they are supposed to be exposed.
They are only exposed on non-x86 Linux machines so I expect we could just un-export them if they aren't supposed to be exported...
The text was updated successfully, but these errors were encountered:
I suspect these were exported because the implementation was based on internal/cpu from the standard library where they need to be exported to be used in runtime.
IMO it would be fine to unexport them, also given the following comment:
// These are initialized in cpu_$GOARCH.go// and should not be changed after they are initialized.
I also agree to make them unexported. They are an implementation detail that should not have be exposed and it is hard to impossible to know from the outside if the value is valid/initialized.
Are
cpu.HWCap
andcpu.HWCap2
supposed to be exported as part of thecpu
API? I can't see any discussion about this in CL 150718 where they were added. Presumably they should be properly documented if they are supposed to be exposed.They are only exposed on non-x86 Linux machines so I expect we could just un-export them if they aren't supposed to be exported...
The text was updated successfully, but these errors were encountered: