{"id":19544282,"url":"https://github.com/mehrdadrad/stags","last_synced_at":"2025-08-23T22:09:38.383Z","repository":{"id":57551729,"uuid":"221968614","full_name":"mehrdadrad/stags","owner":"mehrdadrad","description":"Go library to get and convert struct tags values","archived":false,"fork":false,"pushed_at":"2020-05-17T04:49:03.000Z","size":14,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T05:41:39.988Z","etag":null,"topics":["golang","library","package","struct","structure","tag"],"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/mehrdadrad.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":"2019-11-15T17:04:49.000Z","updated_at":"2024-12-21T13:01:56.000Z","dependencies_parsed_at":"2022-09-26T18:41:35.757Z","dependency_job_id":null,"html_url":"https://github.com/mehrdadrad/stags","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mehrdadrad/stags","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehrdadrad%2Fstags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehrdadrad%2Fstags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehrdadrad%2Fstags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehrdadrad%2Fstags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehrdadrad","download_url":"https://codeload.github.com/mehrdadrad/stags/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehrdadrad%2Fstags/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265313422,"owners_count":23745190,"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":["golang","library","package","struct","structure","tag"],"created_at":"2024-11-11T03:26:28.304Z","updated_at":"2025-07-14T15:38:32.227Z","avatar_url":"https://github.com/mehrdadrad.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stags\n[![Build Status](https://travis-ci.org/mehrdadrad/stags.svg?branch=master)](https://travis-ci.org/mehrdadrad/stags) \n[![Go Report Card](https://goreportcard.com/badge/github.com/mehrdadrad/stags)](https://goreportcard.com/report/github.com/mehrdadrad/stags)\n[![GoCover](https://gocover.io/_badge/github.com/mehrdadrad/stags)](https://gocover.io/github.com/mehrdadrad/stags)\n[![Godoc](https://godoc.org/github.com/mehrdadrad/stags?status.svg)](https://godoc.org/github.com/mehrdadrad/stags)\n\nGo library to get and convert struct tags values\n\n## Features\n- supports nested structure\n- convert the tag's value to given data type\n\n\n## Installation\n\nStandard `go get`:\n\n```bash\n$ go get github.com/mehrdadrad/stags\n```\n\n## Usage \u0026 Example\n\nFor usage and examples see the [Godoc](http://godoc.org/github.com/mehrdadrad/stags).\n\n```go\ntype Configuration struct {\n    Debug   bool `json:\"debug\" env:\"CFG_DEBUG\" default:\"true\"`\n    Proxy struct {\n        Address string `json:\"address\" env:\"CFG_ADDR\" default:\"localhost\"`\n        Port    string `json:\"port\" env:\"CFG_PORT\" default:\"8080\"`\n    }\n}\n```\n\n```go\nfunc main() {\n     cfg := Configuration{}\n \n     s := stags.New(cfg)\n \n     debug := s.GetBool(\"default\", \"Debug\") // returns true, type: bool\n \n     pEnvKey := s.Get(\"env\", \"Proxy\", \"Address\") // returns CFG_ADDR, type: string\n     \n     value, ok := s.LookupInt64(\"timeout\", \"proxy\", \"timeout\") // ok: false\n}\n\n```\n\n## License\nThis project is licensed under MIT license. Please read the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehrdadrad%2Fstags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehrdadrad%2Fstags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehrdadrad%2Fstags/lists"}