{"id":18446648,"url":"https://github.com/cristalhq/flagx","last_synced_at":"2025-07-06T13:03:04.885Z","repository":{"id":57658143,"uuid":"466770049","full_name":"cristalhq/flagx","owner":"cristalhq","description":"Go flag utils","archived":false,"fork":false,"pushed_at":"2024-03-07T18:46:02.000Z","size":57,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T17:52:59.201Z","etag":null,"topics":["cli","config","flags","go","golang"],"latest_commit_sha":null,"homepage":null,"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/cristalhq.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-03-06T15:02:08.000Z","updated_at":"2025-02-16T07:37:26.000Z","dependencies_parsed_at":"2024-03-07T20:04:12.588Z","dependency_job_id":null,"html_url":"https://github.com/cristalhq/flagx","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristalhq%2Fflagx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristalhq%2Fflagx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristalhq%2Fflagx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristalhq%2Fflagx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cristalhq","download_url":"https://codeload.github.com/cristalhq/flagx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248996795,"owners_count":21195785,"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","config","flags","go","golang"],"created_at":"2024-11-06T07:09:54.930Z","updated_at":"2025-04-15T02:41:08.369Z","avatar_url":"https://github.com/cristalhq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flagx\n\n[![build-img]][build-url]\n[![pkg-img]][pkg-url]\n[![reportcard-img]][reportcard-url]\n[![coverage-img]][coverage-url]\n[![version-img]][version-url]\n\nGo flag utils.\n\n## Features\n\n* Simple API.\n* Dependency-free.\n* Clean and tested code.\n* Fully compatible with `flag` package.\n\nSee [GUIDE.md](https://github.com/cristalhq/flagx/blob/main/GUIDE.md) for more details.\n\n## Install\n\nGo version 1.17+\n\n```\ngo get github.com/cristalhq/flagx\n```\n\n## Example\n\n```go\nargs := []string{\"-t\", \"20s\"} // or os.Args[1:]\n\nvar d time.Duration\nfset := flagx.NewFlagSet(\"testing\", os.Stderr)\nfset.Duration(\u0026d, \"timeout\", \"t\", 10*time.Second, \"just a timeout\")\n\nerr := fset.Parse(args)\nif err != nil {\n\tpanic(err)\n}\n\nfmt.Println(d)\n\n// Output: 20s\n```\n\nAlso see examples: [examples_test.go](https://github.com/cristalhq/flagx/blob/main/example_test.go).\n\n## Documentation\n\nSee [these docs][pkg-url].\n\n## License\n\n[MIT License](LICENSE).\n\n[build-img]: https://github.com/cristalhq/flagx/workflows/build/badge.svg\n[build-url]: https://github.com/cristalhq/flagx/actions\n[pkg-img]: https://pkg.go.dev/badge/cristalhq/flagx\n[pkg-url]: https://pkg.go.dev/github.com/cristalhq/flagx\n[reportcard-img]: https://goreportcard.com/badge/cristalhq/flagx\n[reportcard-url]: https://goreportcard.com/report/cristalhq/flagx\n[coverage-img]: https://codecov.io/gh/cristalhq/flagx/branch/main/graph/badge.svg\n[coverage-url]: https://codecov.io/gh/cristalhq/flagx\n[version-img]: https://img.shields.io/github/v/release/cristalhq/flagx\n[version-url]: https://github.com/cristalhq/flagx/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristalhq%2Fflagx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcristalhq%2Fflagx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristalhq%2Fflagx/lists"}