{"id":15501384,"url":"https://github.com/fgm/subcommands_demo","last_synced_at":"2025-04-22T23:07:20.191Z","repository":{"id":66537770,"uuid":"463472512","full_name":"fgm/subcommands_demo","owner":"fgm","description":"A tutorial for the github.com/google/subcommands package","archived":false,"fork":false,"pushed_at":"2022-03-03T16:39:03.000Z","size":39,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T23:07:12.631Z","etag":null,"topics":["cli","cmd","command-line-tool","commands","golang"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fgm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-25T09:27:05.000Z","updated_at":"2024-07-11T07:19:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0867cea-1c37-4da2-bace-3efefeecd8ec","html_url":"https://github.com/fgm/subcommands_demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgm%2Fsubcommands_demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgm%2Fsubcommands_demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgm%2Fsubcommands_demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgm%2Fsubcommands_demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgm","download_url":"https://codeload.github.com/fgm/subcommands_demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250337947,"owners_count":21414104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","cmd","command-line-tool","commands","golang"],"created_at":"2024-10-02T09:04:11.393Z","updated_at":"2025-04-22T23:07:20.186Z","avatar_url":"https://github.com/fgm.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-level demo for github.com/google/subcommands\n\nThis tutorial contains one branch per topic.\n\n\n## Usage\n\nCheckout each branch in turn to learn one level at a time.\n\n- Ensure you have already installed:\n  - A working Go SDK\n  - The [`staticcheck`](https://staticcheck.io) linting tool\n  - The `make` command\n- Run `make` to see the new features in that branch\n\n\n## Contents\n\n1. simple subcommands\n   1. basic usage with builtin commands\n   2. creating commands with the procedural API\n   3. passing non-CLI arguments\n   4. command groups\n   5. adding command flags\n   6. marking flags as important\n2. reusing command code\n3. commanders\n   1. procedural vs object API\n   2. creating commands with custom commanders\n   3. creating a testable command structure\n4. creating nested commands\n5. beyond `NewCommander`\n   1. controlling output\n   2. introspecting commanders\n   3. replacing builtins\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgm%2Fsubcommands_demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgm%2Fsubcommands_demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgm%2Fsubcommands_demo/lists"}