mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
Refactor platform detection and error reporting logic into dedicated, testable functions. This improves code organization and enables better error handling for unsupported platforms and missing platform packages. - Add SUPPORTED_PLATFORMS constant with platform labels - Extract getPlatformKey() utility function - Extract isSupportedPlatform() validation function - Extract reportUnsupportedPlatform() error reporting function - Extract reportMissingPlatformPackage() error reporting function - Update main() to use new functions for clearer error handling