Commit Graph

3 Commits

Author SHA1 Message Date
Wei Fu
6b7e237fc7 chore: use go fix to cleanup old +build buildtag
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-29 14:25:14 +08:00
Tony Fang
6e55234c38 Add unit test to function GetCPUVariantFromArch
Add unit test to function GetCPUVariantFromArch
Fix import issue on non-linux platforms
Fix some style issue

Signed-off-by: Tony Fang <nenghui.fang@gmail.com>
2022-12-20 22:00:12 +00:00
Tony Fang
8d5c045435 Use uname machine field to get CPU variant if fails at /proc/cpuinfo
When images/containers in ARM arch were built/executed on x86 host,
getCPUVariant will fail as it tries to look for /proc/cpuinfo, whose
content is from the host. Adding a new method as fallback to check uname
machine when it happens.

Signed-off-by: Tony Fang <nenghui.fang@gmail.com>
2022-12-20 21:59:32 +00:00