{"id":20872448,"url":"https://github.com/romnn/configo","last_synced_at":"2025-06-13T21:34:41.825Z","repository":{"id":57521318,"uuid":"252281939","full_name":"romnn/configo","owner":"romnn","description":"Dead simple handling of config structs containing optional values for your golang app.","archived":false,"fork":false,"pushed_at":"2021-02-03T21:47:11.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T16:02:48.251Z","etag":null,"topics":["configuration","go","golang","merge","null","optionals","options-parsing","override","settings"],"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/romnn.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":"2020-04-01T20:39:53.000Z","updated_at":"2021-02-04T02:04:42.000Z","dependencies_parsed_at":"2022-09-26T18:01:18.139Z","dependency_job_id":null,"html_url":"https://github.com/romnn/configo","commit_stats":null,"previous_names":["romnnn/configo"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/romnn/configo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fconfigo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fconfigo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fconfigo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fconfigo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romnn","download_url":"https://codeload.github.com/romnn/configo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fconfigo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259723691,"owners_count":22901954,"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":["configuration","go","golang","merge","null","optionals","options-parsing","override","settings"],"created_at":"2024-11-18T06:19:04.787Z","updated_at":"2025-06-13T21:34:41.800Z","avatar_url":"https://github.com/romnn.png","language":"Go","readme":"## configo\n\n[![Build Status](https://github.com/romnn/configo/workflows/test/badge.svg)](https://github.com/romnn/configo/actions)\n[![GitHub](https://img.shields.io/github/license/romnn/configo)](https://github.com/romnn/configo)\n[![GoDoc](https://godoc.org/github.com/romnn/configo?status.svg)](https://godoc.org/github.com/romnn/configo)\n[![Test Coverage](https://codecov.io/gh/romnn/configo/branch/master/graph/badge.svg)](https://codecov.io/gh/romnn/configo)\n[![Release](https://img.shields.io/github/release/romnn/configo)](https://github.com/romnn/configo/releases/latest)\n\nDead simple handling of config structs containing optional values for your golang app!\n\n\n#### Usage\n\n```golang\nimport (\n\t\"fmt\"\n\topt \"github.com/romnn/configo\"\n)\n\ntype myAppConfig struct {\n\tEnableExperimental *opt.Flag\n}\n\nvar defaultConfig myAppConfig = myAppConfig{\n\tEnableExperimental: opt.SetFlag(false),\n}\n\nfunc main() {\n\tuserConfig := myAppConfig{\n\t\tEnableExperimental: opt.SetFlag(true),\n\t}\n\t// Merge user config with the default config\n\t// Will only set values that have NOT been set\n\t// Otherwise, use OverrideConfig\n\topt.MergeConfig(\u0026userConfig, defaultConfig)\n\tdidEnableExperimental := opt.Enabled(userConfig.EnableExperimental)\n\tfmt.Printf(\"EnableExperimental=%t\\n\", didEnableExperimental) // true\n}\n```\n\nFor more examples, see `examples/`.\n\n\n#### Development\n\n######  Prerequisites\n\nBefore you get started, make sure you have installed the following tools::\n\n    $ python3 -m pip install -U cookiecutter\u003e=1.4.0\n    $ python3 -m pip install pre-commit bump2version invoke ruamel.yaml halo\n    $ go get -u golang.org/x/tools/cmd/goimports\n    $ go get -u golang.org/x/lint/golint\n    $ go get -u github.com/fzipp/gocyclo\n    $ go get -u github.com/mitchellh/gox  # if you want to test building on different architectures\n\n**Remember**: To be able to excecute the tools downloaded with `go get`, \nmake sure to include `$GOPATH/bin` in your `$PATH`.\nIf `echo $GOPATH` does not give you a path make sure to run\n(`export GOPATH=\"$HOME/go\"` to set it). In order for your changes to persist, \ndo not forget to add these to your shells `.bashrc`.\n\nWith the tools in place, it is strongly advised to install the git commit hooks to make sure checks are passing in CI:\n```bash\ninvoke install-hooks\n```\n\nYou can check if all checks pass at any time:\n```bash\ninvoke pre-commit\n```\n\nNote for Maintainers: After merging changes, tag your commits with a new version and push to GitHub to create a release:\n```bash\nbump2version (major | minor | patch)\ngit push --follow-tags\n```\n\n#### Note\n\nThis project is still in the alpha stage and should not be considered production ready.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromnn%2Fconfigo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromnn%2Fconfigo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromnn%2Fconfigo/lists"}