(feat): bring pretty to 2026 #2
Merged
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.
This pull request introduces several improvements and new features, focusing on enhanced host specification parsing, improved documentation, and better test coverage. The most significant changes are the addition of robust host parsing logic, comprehensive tests for host parsing and configuration, and a major update to the project documentation. Additionally, new GitHub Actions workflows for CI, Go build/test, and CodeQL analysis have been added.
Host specification and parsing improvements:
cmd/hosts.gowith robust parsing for host specifications, including support foruser@host,host:port, IPv6, and group/user precedence, along with error handling and utility functions.cmd/root.goto use the new host parsing logic, ensuring consistent handling of positional hosts, host groups, and hosts files.Testing enhancements:
cmd/hosts_test.gowith comprehensive unit tests for host parsing, group parsing, file parsing, argument parsing, and prompt flag override logic.Documentation improvements:
README.mdto provide clear installation instructions, configuration schema, usage examples, host specification formats, flag descriptions, interactive commands, and testbed instructions.Project structure and CI:
internal/for better code organization and updated imports accordingly..github/workflows/ci.yml), Go build/test (.github/workflows/go.yml), and CodeQL analysis (.github/workflows/codeql.yml). [1] [2] [3]