{"id":17309969,"url":"https://github.com/metafates/conphig","last_synced_at":"2025-07-10T05:33:36.894Z","repository":{"id":200576339,"uuid":"705839075","full_name":"metafates/conphig","owner":"metafates","description":"⚙️ A better way to manage configs in Go","archived":false,"fork":false,"pushed_at":"2023-10-16T20:12:26.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T05:55:01.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metafates.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":"2023-10-16T19:40:07.000Z","updated_at":"2023-10-16T19:40:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"70abf1c6-98f1-4849-b7a3-d72c195b7661","html_url":"https://github.com/metafates/conphig","commit_stats":null,"previous_names":["metafates/conphig"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/metafates/conphig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafates%2Fconphig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafates%2Fconphig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafates%2Fconphig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafates%2Fconphig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metafates","download_url":"https://codeload.github.com/metafates/conphig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafates%2Fconphig/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264535993,"owners_count":23624404,"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":"2024-10-15T12:34:11.520Z","updated_at":"2025-07-10T05:33:36.843Z","avatar_url":"https://github.com/metafates.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚙️ Conφg\n\n\u003e Spells like \"con-phi-g\"\n\nA better way to manage Go apps configuration\n\n```go\nvar PositiveInteger = conphig.New[int, int](\n\t\"positive_integer\",\n\t42,\n\tconphig.ID[int],\n\tconphig.WithDescription[int, int](\"Positive integer \u003e 0\"),\n\tconphig.WithValidateFunc[int](func(i int) error {\n\t\tif i \u003c= 0 {\n\t\t\treturn fmt.Errorf(\"expected \u003e= 0, got %d\", i)\n\t\t}\n\n\t\treturn nil\n\t}),\n)\n\nvar FooBar = conphig.New[string, string](\n\t\"foobar\",\n\t\"${EDITOR}, $USER and $HOME\",\n\tconphig.ID[string],\n\tconphig.WithDescription[string, string](\"String with env variables\"),\n\tconphig.WithAdjustFunc[string, string](func(s string) (string, error) {\n\t\treturn os.ExpandEnv(s), nil\n\t}),\n)\n\nvar Time = conphig.New[string, time.Time](\n\t\"time\",\n\ttime.Now(),\n\tfunc(s string) (time.Time, error) {\n\t\treturn time.Parse(time.Kitchen, s)\n\t},\n)\n```\n\n\u003e [!NOTE]  \n\u003e Work in progress, API may change\n\n## How to use\n\nConphig extends awesome [koanf](https://github.com/knadh/koanf) library.\n\nSee [examples](./examples) for examples how to use this library.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetafates%2Fconphig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetafates%2Fconphig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetafates%2Fconphig/lists"}