feat: refactor to proper Go structure and add folder/recursive support
- Refactor to cmd/internal structure following Go best practices - Add support for processing directories (files in folder) - Add -r/--recursive flag for recursive directory traversal - Split code into logical packages: types, processor, languages - Fix --version flag to work properly with kong - Update build path in GitHub Actions workflow - Version bump to 0.1.0 for new major features
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package types
|
||||
|
||||
import "github.com/alecthomas/kong"
|
||||
|
||||
type CLI struct {
|
||||
Path string `arg:"" name:"path" help:"Source code file or directory to process" optional:""`
|
||||
Inline bool `help:"Remove only line comments"`
|
||||
Block bool `help:"Remove only block comments"`
|
||||
Recursive bool `short:"r" help:"Process directories recursively"`
|
||||
DryRun bool `help:"Show what would be removed without making changes"`
|
||||
Backup bool `help:"Create backup files before modification"`
|
||||
Verbose bool `help:"Show detailed output"`
|
||||
Version kong.VersionFlag `help:"Show version information"`
|
||||
}
|
||||
|
||||
type Language struct {
|
||||
LineComment string
|
||||
BlockComment *BlockComment
|
||||
}
|
||||
|
||||
type BlockComment struct {
|
||||
Start string
|
||||
End string
|
||||
}
|
||||
Reference in New Issue
Block a user