{"id":24086435,"url":"https://github.com/electrikmilk/args-parser","last_synced_at":"2025-02-27T03:28:13.875Z","repository":{"id":65192830,"uuid":"583829470","full_name":"electrikmilk/args-parser","owner":"electrikmilk","description":"Arguments and auto-generated usage package","archived":false,"fork":false,"pushed_at":"2023-10-22T04:06:18.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T01:57:49.824Z","etag":null,"topics":["args","argument-handler","argument-parser","arguments","go","golang"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/electrikmilk/args-parser","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/electrikmilk.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}},"created_at":"2022-12-31T04:26:34.000Z","updated_at":"2023-03-15T00:32:17.000Z","dependencies_parsed_at":"2023-02-19T01:30:59.811Z","dependency_job_id":"d64aa2f0-616a-48bd-b0d4-0087600a7d63","html_url":"https://github.com/electrikmilk/args-parser","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrikmilk%2Fargs-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrikmilk%2Fargs-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrikmilk%2Fargs-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrikmilk%2Fargs-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electrikmilk","download_url":"https://codeload.github.com/electrikmilk/args-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240972337,"owners_count":19886938,"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":["args","argument-handler","argument-parser","arguments","go","golang"],"created_at":"2025-01-10T01:57:58.569Z","updated_at":"2025-02-27T03:28:13.856Z","avatar_url":"https://github.com/electrikmilk.png","language":"Go","readme":"# args-parser\n\n\u003cp\u003e\n        \u003ca href=\"https://github.com/electrikmilk/args-parser/actions/workflows/go.yml\"\u003e\u003cimg src=\"https://github.com/electrikmilk/args-parser/actions/workflows/go.yml/badge.svg?branch=main\" alt=\"Build \u0026 Test\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/electrikmilk/args-parser?tab=doc\"\u003e\u003cimg src=\"https://godoc.org/github.com/golang/gddo?status.svg\" alt=\"GoDoc\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/electrikmilk/args-parser\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/electrikmilk/args-parser\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nA simple arguments parser written in Go. Mainly here so I can easily use it in my other projects.\n\n### Register arguments\n\nYou can currently register options/flags, then check on if that flag was used and access its value if applicable.\n\n```go\nargs.Register(args.Argument{\n        name: \"arg\",\n        description: \"My first argument\",\n})\n```\n\n### Auto-generated usage information\n\n```go\nargs.PrintUsage()\n```\n\n### Usage\n\nFlags follow the UNIX rules of having one dash for single-letter versions of flags and double-dashed versions of flags with whole words. (e.g. `-a` `--all`). It doesn't technically matter though since it just trims dashes from the beginning of the argument.\n\nArgument values proceed the flag with a `=` sign separating (e.g. `-a=value` `--arg=value`).\n\nThen either check if the flag is being used or get its value.\n\n```go\nargs.Using(\"arg\") // bool\n\nargs.Value(\"arg\") // string\n```\n\n---\n\nDoes not _yet_ support subcommands.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectrikmilk%2Fargs-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectrikmilk%2Fargs-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectrikmilk%2Fargs-parser/lists"}