{"id":28624241,"url":"https://github.com/zypeh/docflag","last_synced_at":"2025-06-12T07:12:07.241Z","repository":{"id":35851183,"uuid":"40135347","full_name":"zypeh/docflag","owner":"zypeh","description":"Make your help/usage page looks cleaner!","archived":false,"fork":false,"pushed_at":"2015-08-19T12:52:53.000Z","size":996,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-18T21:02:56.191Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/zypeh.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}},"created_at":"2015-08-03T16:24:46.000Z","updated_at":"2024-04-18T21:02:56.192Z","dependencies_parsed_at":"2022-09-18T01:43:08.179Z","dependency_job_id":null,"html_url":"https://github.com/zypeh/docflag","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zypeh/docflag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zypeh%2Fdocflag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zypeh%2Fdocflag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zypeh%2Fdocflag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zypeh%2Fdocflag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zypeh","download_url":"https://codeload.github.com/zypeh/docflag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zypeh%2Fdocflag/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259418294,"owners_count":22854188,"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":[],"created_at":"2025-06-12T07:11:38.511Z","updated_at":"2025-06-12T07:12:07.210Z","avatar_url":"https://github.com/zypeh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docflag\nDocflag implements command-line flag parsing with simple and intuitive style.\nThe code is inspired by the revel/cmd package.\n\n```\nimport \"github.com/Zypeh/docflag\"\nfunc main() {\n\tdocflag.Parse()\n}\n```\n\nIt offers:\n\n* both short and long description\nuse \"help [command]\" for more information\nhere is how we include our command's description\n```\nvar cmdTest = \u0026Command{\n\tUsageLine: \"test [time of repeats] [string]\",\n\tShort \"Simple Example - Echo function\",\n\tLong: `\nThis is the long description to be shown when you help [command].\n`\n}\n```\n\n* Simple adding commands\nadding your command in main.go, for example, cmdBuild.\n```\n// Add your command here\nvar commands = []*Command {\n\tcmdTest,\n\t// .... Add your command here ...\n\tcmdBuild,\n}\n```\nand start writing your function under the command.\n```\npackage docflag\n\nfunc init () {\n\tcmdBuild.Run = build\n}\n\nfunc Build (args []string) { ... }\n```\n\n* Usage template file.\nsimply edit the template file in the App.cfg\n```\n[App]\nAppName = \"Echo-go\"\nHeader = \"-----[[ Simple Echo ]]-----\"\n\n[Template]\nusageTemplate = \"Usage: echo-go command [arguments]\"\n// SNIP...\n```\n\n\n\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzypeh%2Fdocflag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzypeh%2Fdocflag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzypeh%2Fdocflag/lists"}