refactor(core)!: Refactor Core to GoLang#4
Open
cakeholeDC wants to merge 75 commits into
Open
Conversation
af7a10b to
93ee2b0
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR represents a major refactor of the core application from Python to GoLang, introducing a complete rewrite of the on-air CLI tool for controlling Home Assistant entities. The change includes new Go packages for logging, configuration management, encryption, and Home Assistant API interaction, while removing the previous Python implementation.
- Complete rewrite from Python to Go with new CLI structure using Cobra
- Implementation of comprehensive logging system with file rotation capabilities
- Addition of encryption/decryption functionality for configuration files
Reviewed Changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| main.go | Entry point that initializes the CLI command execution |
| logger/logger.go | Logging system with customizable module-based loggers and file rotation |
| logger/logger_test.go | Test suite for logger functionality including file writing verification |
| encryption/encryption.go | AES encryption/decryption utilities for secure data storage |
| encryption/encryption_test.go | Test coverage for encryption functions with error scenarios |
| common/common.go | Shared utilities for JSON/YAML output, terminal sizing, and file I/O |
| common/common_test.go | Tests for common utility functions including file operations |
| appconfig/appconfig.go | Configuration management with YAML serialization and encryption support |
| appconfig/appconfig_test.go | Configuration system tests with temporary file handling |
| cmd/root.go | Root CLI command definition with Cobra framework |
| cmd/root_test.go | CLI help command testing |
| cmd/config/config.go | Configuration subcommand implementation with flag handling |
| hass/health.go | Home Assistant API health check functionality with HTTP client abstraction |
| hass/health_test.go | Mock-based tests for Home Assistant API interactions |
| go.mod | Go module definition with dependencies |
| .pre-commit-config.yaml | Updated pre-commit hooks to accommodate Go development |
| .github/workflows/test-and-lint.yml | CI workflow updates to include Go testing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Complete rewrite of the application as a go cli tool.