How shenguanjiejie/workwork works
Project type and purpose
• This is a stand‑alone CLI application written in Go (“workwork”), providing a suite of developer/tester utilities (base64, cc, go‑script runner, md5, regex tester, time formatter, translator, URL encoder/decoder, UUID generator).
• There is no web frontend or backend service; all components run in a single binary and are invoked via command line.
File structure
• Top‑level files
• main.go – the entry point
• cmd/ – contains all Cobra subcommands (root.go and one file per tool)
• cmd/model/ – shared types for commands and flags
• build.sh, install.sh – build and installation scripts
• resources/ – sample input files and screenshot assets
• go.mod, go.sum – dependency management
• workwork.yaml – (potential future config)
• Patterns
• Cobra CLI framework: root command (cmd/root.go) delegates to subcommands (cmd/base64.go, cmd/cc.go, …).
• Shared “model” package defines command metadata and flag parsing helpers.
• Each subcommand implements its own logic, invoking utility functions or third‑party libs (e.g. any‑rule for regex, HTTP client for translation).
README for additional insights
• Lists each tool’s functionality, CLI flags, and sample screenshots.
• Mentions external sources (any86/any-rule) and APIs (for translation).
• Plans for future extension (config file support, unit tests, Alfred integration).
Detail level
• Explicitly show external HTTP call from Translator module and external regex library usage