├── .gitignore ├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md └── workflows │ └── conventional-commits-pr.yml ├── src ├── main.go ├── cmd │ ├── root.go │ └── fix.go ├── go.mod └── go.sum ├── README.md ├── CONTRIBUTING.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | .idea/ 3 | .DS_Store 4 | *.exe 5 | *.exe~ 6 | *.dll 7 | *.so 8 | *.dylib 9 | *.test 10 | *.tmp 11 | *.out 12 | *.json 13 | *.log 14 | .env 15 | vendor/ 16 | bin/ 17 | build/ 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### Steps to reproduce 11 | 12 | ### Expected behavior 13 | 14 | ### Actual behavior 15 | -------------------------------------------------------------------------------- /src/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "github.com/troodinc/trood/cmd" 6 | "log" 7 | "os" 8 | "os/signal" 9 | "syscall" 10 | ) 11 | 12 | func main() { 13 | ctx, shutdown := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) 14 | defer shutdown() 15 | 16 | root := cmd.NewRootCmd() 17 | if err := root.ExecuteContext(ctx); err != nil { 18 | log.Fatal(err) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.github/workflows/conventional-commits-pr.yml: -------------------------------------------------------------------------------- 1 | name: PR Conventional Commit Validation 2 | 3 | on: 4 | pull_request: 5 | types: [opened, synchronize, reopened, edited] 6 | 7 | jobs: 8 | validate-pr-title: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: PR Conventional Commit Validation 12 | uses: ytanikin/pr-conventional-commits@1.4.0 13 | with: 14 | task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]' -------------------------------------------------------------------------------- /src/cmd/root.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/spf13/cobra" 5 | ) 6 | 7 | func NewRootCmd() *cobra.Command { 8 | cmd := &cobra.Command{ 9 | Use: "trood", 10 | Short: "A CLI tool for detecting and fixing issues in your projects.", 11 | Long: `Trood is an interactive command-line tool designed to scan project files, 12 | identify potential issues, and provide actionable fixes.`, 13 | CompletionOptions: cobra.CompletionOptions{DisableDefaultCmd: true}, 14 | } 15 | 16 | cmd.AddCommand(newFixCmd()) 17 | 18 | return cmd 19 | } 20 | -------------------------------------------------------------------------------- /src/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/troodinc/trood 2 | 3 | go 1.23.2 4 | 5 | require ( 6 | github.com/gdamore/encoding v1.0.1 // indirect 7 | github.com/gdamore/tcell/v2 v2.8.1 // indirect 8 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 9 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect 10 | github.com/mattn/go-runewidth v0.0.16 // indirect 11 | github.com/rivo/tview v0.0.0-20241227133733-17b7edb88c57 // indirect 12 | github.com/rivo/uniseg v0.4.7 // indirect 13 | github.com/spf13/cobra v1.9.1 // indirect 14 | github.com/spf13/pflag v1.0.6 // indirect 15 | golang.org/x/sys v0.29.0 // indirect 16 | golang.org/x/term v0.28.0 // indirect 17 | golang.org/x/text v0.21.0 // indirect 18 | ) 19 | -------------------------------------------------------------------------------- /src/cmd/fix.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "github.com/spf13/cobra" 7 | "os" 8 | "path/filepath" 9 | 10 | "github.com/gdamore/tcell/v2" 11 | "github.com/rivo/tview" 12 | ) 13 | 14 | var selectedFiles = make(map[string]bool) 15 | 16 | func newFixCmd() *cobra.Command { 17 | cmd := &cobra.Command{ 18 | Use: "fix", 19 | Short: "Detect and fix issues in a project", 20 | Long: `An interactive tool to scan project files, identify potential problems, and suggest fixes.`, 21 | RunE: func(_ *cobra.Command, args []string) error { 22 | path := "." 23 | if len(args) > 0 { 24 | path = args[0] 25 | } 26 | 27 | if _, err := os.Stat(path); os.IsNotExist(err) { 28 | return errors.New("the specified path does not exist") 29 | } 30 | 31 | app := tview.NewApplication() 32 | treeRoot := tview.NewTreeNode(path).SetSelectable(false) 33 | treeView := tview.NewTreeView().SetRoot(treeRoot).SetCurrentNode(treeRoot) 34 | 35 | loadFilesIntoTree(treeRoot, path) 36 | 37 | treeView.SetSelectedFunc(func(node *tview.TreeNode) { 38 | path, ok := node.GetReference().(string) 39 | if !ok { 40 | return 41 | } 42 | 43 | if selectedFiles[path] { 44 | deselectRecursively(node) 45 | } else { 46 | selectRecursively(node) 47 | } 48 | }) 49 | 50 | treeView.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { 51 | if event.Key() == tcell.KeyEnter { 52 | app.Stop() 53 | printSelectedFiles() 54 | return nil 55 | } 56 | return event 57 | }) 58 | 59 | layout := tview.NewFlex(). 60 | SetDirection(tview.FlexRow). 61 | AddItem(tview.NewTextView().SetText("Use ↑↓ to navigate, Space to select, Enter to confirm."), 1, 1, false). 62 | AddItem(treeView, 0, 1, true) 63 | 64 | if err := app.SetRoot(layout, true).Run(); err != nil { 65 | return err 66 | } 67 | 68 | return nil 69 | }, 70 | } 71 | 72 | return cmd 73 | } 74 | 75 | func loadFilesIntoTree(parentNode *tview.TreeNode, path string) { 76 | files, err := os.ReadDir(path) 77 | if err != nil { 78 | return 79 | } 80 | 81 | for _, file := range files { 82 | filePath := filepath.Join(path, file.Name()) 83 | node := tview.NewTreeNode(file.Name()). 84 | SetReference(filePath). 85 | SetSelectable(true) 86 | 87 | if file.IsDir() { 88 | node.SetColor(tcell.ColorBlue) 89 | loadFilesIntoTree(node, filePath) 90 | } else { 91 | node.SetColor(tcell.ColorWhite) 92 | } 93 | 94 | parentNode.AddChild(node) 95 | } 96 | } 97 | 98 | func selectRecursively(node *tview.TreeNode) { 99 | path, ok := node.GetReference().(string) 100 | if !ok { 101 | return 102 | } 103 | 104 | selectedFiles[path] = true 105 | node.SetColor(tcell.ColorGreen) 106 | 107 | for _, child := range node.GetChildren() { 108 | selectRecursively(child) 109 | } 110 | } 111 | 112 | func deselectRecursively(node *tview.TreeNode) { 113 | path, ok := node.GetReference().(string) 114 | if !ok { 115 | return 116 | } 117 | 118 | delete(selectedFiles, path) 119 | node.SetColor(tcell.ColorWhite) 120 | 121 | for _, child := range node.GetChildren() { 122 | deselectRecursively(child) 123 | } 124 | } 125 | 126 | func printSelectedFiles() { 127 | if len(selectedFiles) == 0 { 128 | fmt.Println("No files selected.") 129 | return 130 | } 131 | fmt.Println("Selected files:") 132 | for file := range selectedFiles { 133 | fmt.Println(file) 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Trood CLI 2 | 3 | ![GitHub License](https://img.shields.io/github/license/TroodInc/trood?label=License) 4 | [![Discord](https://img.shields.io/discord/965192030273802290?style=flat&logo=discord&label=Community&logoColor=%23ffffff&color=%235865F2)](https://discord.gg/ktPZ8cDxCT) 5 | [![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/troodinc?label=Run%20on%20%40troodinc)](https://x.com/troodinc) 6 | [![Telegram](https://img.shields.io/badge/Run_on_@troodcommunity-24a1d3?logo=telegram&logoColor=white)](https://t.me/troodcommunity) 7 | 8 | Welcome to Trood CLI, an AI-powered debugging tool for software troubleshooting. It analyzes your code, dependencies, and configurations to detect and resolve potential issues before they cause production failures. 9 | 10 | --- 11 | 12 | ## Vision 13 | 14 | Our goal is to **make project analysis easier**, **give accurate debugging suggestions**, and **unite teams** helping developers work faster and more efficiently. 15 | 16 | Trood CLI solves two main problems: 17 | 18 | 1. **Debugging alone**. No more wasting time trying to figure things out by yourself. While AI can assist in generating code, it’s not always efficient at eliminating the bugs it creates—yet. 19 | 2. **Scaling under pressure**. Deadlines are tight, and it’s hard to bring in new people fast. Trood CLI helps by finding known issues and summarizing the results, saving you time and reducing the cost of delays. 20 | 21 | --- 22 | 23 | ## What We Offer 24 | 25 | Trood CLI is designed to tackle the most frustrating and time-consuming challenges developers face every day. It: 26 | - **identifies current and potential issues** in your project before bugs make it to production; 27 | - **analyzes project's environment** – searches for potential dependency conflicts and known issues; 28 | - **saves your time** by aggregating information from various resources; 29 | - **engages community experts** with **relevant skillset** sharing **restricted project access** with **only the data needed to quickly solve your problem**; 30 | - **scouts for contributors** across **GitHub, Stack Overflow, Reddit, vendor forums, and other sources**, finding developers who have solved similar problems and may be able to help; 31 | - and **delivers a comprehensive project health report** to keep you posted. 32 | 33 | --- 34 | 35 | ## What's Next? 36 | 37 | We're building beyond debugging. Our next step is to integrate the repository with: 38 | 39 | - [Trood Business/Development Manager](https://trood.com/bdm), for full-scale integration of **business and product architecture, CI/CD, QA, and code management.** 40 | - [Trood Community](https://trood.com/launchpad), to seamlessly **find, engage, and reward** human support from people with **best-matching skills.** 41 | 42 | This repository will be the foundation of the [AI CTO](https://drive.google.com/file/d/1vwete0vAPcEDZrBoGUNRTiJx6OMET9-o/view) we are building 👀 43 | 44 | --- 45 | 46 | ## Contributing 47 | 48 | We’re building a better debugging tool, and your expertise can help. Check out [CONTRIBUTING.md](https://github.com/TroodInc/trood/blob/main/CONTRIBUTING.md) to get started, explore our [Roadmap](https://github.com/TroodInc/trood/issues/18) and [issues](https://github.com/TroodInc/trood/issues). Every contribution makes a difference. 49 | 50 | --- 51 | 52 | [![Launchpad](https://img.shields.io/badge/Trood_Launchpad-d40000?logo=rocket&logoColor=white)](https://trood.com/launchpad) 53 | [![LinkedIn](https://img.shields.io/badge/Run_on_Trood-0A66C2?&label=LinkedIn)](https://www.linkedin.com/company/troodinc) 54 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 2 | # Contributing to Trood CLI 🚀 3 | 4 | Thank you for your interest in contributing to **Trood CLI**! 🎉 We welcome contributions of all kinds—bug fixes, new features, documentation improvements, or fresh ideas. Your support makes Trood CLI better for everyone! 🙌 5 | 6 | ## 🛠️ How to Contribute 7 | 8 | 1. **Fork the Repository** 🍴: Click the **Fork** button at the top right of the repository to create your own copy. 9 | 2. **Clone Your Fork** 💻: Clone your forked repository to your local machine: 10 | 11 | ```bash 12 | git@github.com:TroodInc/trood-kiss.git 13 | ``` 14 | 15 | 3. **Create a Branch** 🌱: Create a new branch for your work with a descriptive name (e.g., `feature-add-debug-guidance` or `bugfix-issue-parser`): 16 | 17 | ```bash 18 | git checkout -b your-branch-name 19 | ``` 20 | 21 | 4. **Make Your Changes** 🛠️: Implement your changes, add tests if applicable, and update documentation as needed. 22 | 5. **Commit Changes** 📌: Write clear and descriptive commit messages. Example: 23 | 24 | - `fix: resolve command parsing error` 25 | - `feat: add step-by-step debugging guidance` 26 | 27 | 6. **Push Your Branch** 🚀: Push your changes to your fork: 28 | 29 | ```bash 30 | git push origin your-branch-name 31 | ``` 32 | 33 | 7. **Open a Pull Request** 🔄: Submit a pull request (PR) against the `main` branch. Describe your changes and reference any related issues. 34 | 35 | ## 🐞 Reporting Bugs 36 | 37 | If you find a bug: 38 | - **Check for Existing Issues** 🔍: Look through [existing issues](https://github.com/TroodInc/trood-kiss/issues) to see if it’s already reported. 39 | - **Open a New Issue** 📄: If not, submit a new issue and include: 40 | - A clear description of the bug. 41 | - Steps to reproduce the problem. 42 | - Expected vs. actual behavior. 43 | - Your environment details (OS, version, etc.). 44 | 45 | ## 💡 Suggesting Enhancements 46 | 47 | We love new ideas! If you have an enhancement suggestion: 48 | - **Open an Issue** 📝: Create a new issue explaining your idea. 49 | - **Provide Details** 🎯: Describe the problem it solves, its benefits, and any relevant examples. 50 | - **Be Specific** 📌: The clearer and more detailed your suggestion, the easier it is for us to consider. 51 | 52 | ## 🔄 Pull Requests 53 | 54 | When submitting a pull request: 55 | - **Follow Code Style** 🎨: Stick to the project's coding standards. 56 | - **Include Tests** ✅: Add or update tests where necessary. 57 | - **Reference Issues** 🔗: Mention any related issues in your PR description. 58 | - **Keep Commits Clear** ✍️: Use meaningful commit messages. 59 | - **Review Process** 👀: Our team will review your PR and provide feedback. Thank you for your patience! 60 | 61 | ## 🏗️ Coding Guidelines 62 | 63 | - **Maintain Consistency** 📏: Follow the project's coding style and conventions. 64 | - **Document Your Changes** 📖: Update documentation if your changes affect functionality. 65 | - **Test Your Code** 🛠️: Ensure your changes work correctly and pass all tests. 66 | - **Write Good Commit Messages** 📝: Explain what each commit does clearly. 67 | 68 | ## 📖 Documentation 69 | 70 | Good documentation benefits everyone: 71 | - **Write Clearly** 📝: Keep it simple and informative. 72 | - **Use Markdown** 📑: Maintain consistency in formatting. 73 | - **Keep It Updated** 🔄: Ensure documentation reflects recent changes. 74 | 75 | ## 🤝 Community & Support 76 | 77 | - **GitHub Issues** 💬: Use issues to report bugs, suggest features, and ask questions. 78 | - **Join Our Community** 🌍: Engage with us on [Launchpad](https://trood.com/launchpad). 79 | - **Respect and Collaboration** 🤗: Be kind, constructive, and professional in discussions. 80 | 81 | ## 📜 License 82 | 83 | By contributing to Trood CLI, you agree that your contributions will be licensed under the [Apache 2.0 License](LICENSE). 84 | 85 | --- 86 | 87 | Thank you for contributing! 🚀 Together, we’re making Trood CLI better! 🎉 88 | ``` 89 | -------------------------------------------------------------------------------- /src/go.sum: -------------------------------------------------------------------------------- 1 | github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= 2 | github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= 3 | github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= 4 | github.com/gdamore/encoding v1.0.1 h1:YzKZckdBL6jVt2Gc+5p82qhrGiqMdG/eNs6Wy0u3Uhw= 5 | github.com/gdamore/encoding v1.0.1/go.mod h1:0Z0cMFinngz9kS1QfMjCP8TY7em3bZYeeklsSDPivEo= 6 | github.com/gdamore/tcell/v2 v2.7.1 h1:TiCcmpWHiAU7F0rA2I3S2Y4mmLmO9KHxJ7E1QhYzQbc= 7 | github.com/gdamore/tcell/v2 v2.7.1/go.mod h1:dSXtXTSK0VsW1biw65DZLZ2NKr7j0qP/0J7ONmsraWg= 8 | github.com/gdamore/tcell/v2 v2.8.1 h1:KPNxyqclpWpWQlPLx6Xui1pMk8S+7+R37h3g07997NU= 9 | github.com/gdamore/tcell/v2 v2.8.1/go.mod h1:bj8ori1BG3OYMjmb3IklZVWfZUJ1UBQt9JXrOCOhGWw= 10 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 11 | github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= 12 | github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= 13 | github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= 14 | github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= 15 | github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= 16 | github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= 17 | github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= 18 | github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= 19 | github.com/rivo/tview v0.0.0-20241227133733-17b7edb88c57 h1:LmsF7Fk5jyEDhJk0fYIqdWNuTxSyid2W42A0L2YWjGE= 20 | github.com/rivo/tview v0.0.0-20241227133733-17b7edb88c57/go.mod h1:02iFIz7K/A9jGCvrizLPvoqr4cEIx7q54RH5Qudkrss= 21 | github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 22 | github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= 23 | github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= 24 | github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= 25 | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 26 | github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= 27 | github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= 28 | github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= 29 | github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 30 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 31 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 32 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 33 | golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= 34 | golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= 35 | golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= 36 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 37 | golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 38 | golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 39 | golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 40 | golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 41 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 42 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 43 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 44 | golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= 45 | golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= 46 | golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= 47 | golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= 48 | golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= 49 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 50 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 51 | golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 52 | golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= 53 | golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 54 | golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 55 | golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 56 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 57 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 58 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 59 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 60 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 61 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 62 | golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 63 | golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 64 | golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= 65 | golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 66 | golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 67 | golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= 68 | golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 69 | golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= 70 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 71 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 72 | golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 73 | golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= 74 | golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= 75 | golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= 76 | golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= 77 | golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= 78 | golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= 79 | golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= 80 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 81 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 82 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 83 | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 84 | golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= 85 | golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 86 | golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= 87 | golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 88 | golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 89 | golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= 90 | golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= 91 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 92 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 93 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 94 | golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 95 | golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= 96 | golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 97 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 98 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 99 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 100 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------