{"id":36891923,"url":"https://github.com/kaatinga/settings","last_synced_at":"2026-01-12T15:38:07.683Z","repository":{"id":51112396,"uuid":"302331456","full_name":"kaatinga/settings","owner":"kaatinga","description":"The package looks up necessary environment variables and use them to specify settings for your application.","archived":false,"fork":false,"pushed_at":"2025-12-25T21:58:32.000Z","size":137,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-27T08:22:22.737Z","etag":null,"topics":["config","configuration","environment-variables","go","golang","help-wanted","needs-review","needs-rework","needs-tests","reflection","settings-management"],"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/kaatinga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-08T12:22:35.000Z","updated_at":"2025-12-25T21:58:33.000Z","dependencies_parsed_at":"2024-03-27T00:28:57.936Z","dependency_job_id":"6a5d7d0c-b85b-4ccb-aba1-e131b6c242bd","html_url":"https://github.com/kaatinga/settings","commit_stats":null,"previous_names":["kaatinga/env_loader"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/kaatinga/settings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaatinga%2Fsettings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaatinga%2Fsettings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaatinga%2Fsettings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaatinga%2Fsettings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaatinga","download_url":"https://codeload.github.com/kaatinga/settings/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaatinga%2Fsettings/sbom","scorecard":{"id":546742,"data":{"date":"2025-08-11","repo":{"name":"github.com/kaatinga/settings","commit":"b4530075cca06953c365c114323054d465037e1e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Maintained","score":5,"reason":"7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/kaatinga/settings/golangci-lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/kaatinga/settings/golangci-lint.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/kaatinga/settings/golangci-lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/kaatinga/settings/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/kaatinga/settings/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/kaatinga/settings/test.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/golangci-lint.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T09:44:08.119Z","repository_id":51112396,"created_at":"2025-08-20T09:44:08.119Z","updated_at":"2025-08-20T09:44:08.119Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["config","configuration","environment-variables","go","golang","help-wanted","needs-review","needs-rework","needs-tests","reflection","settings-management"],"created_at":"2026-01-12T15:38:04.860Z","updated_at":"2026-01-12T15:38:07.677Z","avatar_url":"https://github.com/kaatinga.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub release](https://img.shields.io/github/release/kaatinga/settings.svg)](https://github.com/kaatinga/settings/releases)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/kaatinga/settings/blob/main/LICENSE)\n[![codecov](https://codecov.io/gh/kaatinga/settings/branch/main/graph/badge.svg)](https://codecov.io/gh/kaatinga/settings)\n[![Go CI](https://github.com/kaatinga/settings/actions/workflows/golang_ci.yml/badge.svg)](https://github.com/kaatinga/settings/actions/workflows/golang_ci.yml)\n[![help wanted](https://img.shields.io/badge/Help%20wanted-True-yellow.svg)](https://github.com/kaatinga/settings/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)\n[![CodeQL](https://github.com/kaatinga/settings/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/kaatinga/settings/actions/workflows/github-code-scanning/codeql)\n\n# settings\n\n`settings` is a Go package that simplifies configuration management for your application. It automatically loads environment variables into your configuration structs, supports default values, and validates fields using standard `validate` tags. With `settings`, you can define your application's configuration in a type-safe, declarative way—eliminating boilerplate code and reducing the risk of misconfiguration.\n\n## Contents\n\n1. [Installation](#1-installation)\n2. [Description](#2-description)\n3. [Limitations](#3-limitations)\n\n## 1. Installation\n\nUse `go get` to install the package:\n```bash\ngo get github.com/kaatinga/settings\n````\n\nThen, import the package into your own code:\n```go\nimport \"github.com/kaatinga/settings\"\n```\n\n## 2. Description\n\n### How to use\n\nCreate a settings model where you can use tags `env`, `default` and `validate`. Announce a variable and call `Load()`:\n\n```go\ntype Settings struct {\n    Port       string `env:\"PORT\" validate:\"numeric\"`\n    Database   string `env:\"DATABASE\"`\n    CacheSize  byte `env:\"CACHE_SIZE\" default:\"50\"`\n    LaunchMode string `env:\"LAUNCH_MODE\"`\n}\n\nvar settings Settings\nerr := Load(\u0026settings)\nif err != nil {\n    return err\n}\n```\n\nThe `env` tag must contain the name of the related environment variable.\nThe `default` tag contains a default value that is used in case the environment variable was not found.\nThe `validate` tag may contain an optional validation rule fallowing the documentation of the [validator package](https://github.com/go-playground/validator/). \n\n### Supported types\n\n| Type           | Real type      |\n|----------------|----------------|\n| string         | -              | \n| boolean        | -              | \n| ~int           | -              | \n| ~uint          | -              | \n| time.Duration  | int64          | \n| []string       | []string       |\n| []byte         | []byte         |\n\n### Nested structs\n\nNested structs can be added via pointer or without pointer. Example:\n\n```go\ntype Model2 struct {\n    CacheSize   byte `env:\"CACHE_SIZE\"`\n}\n\ntype Model3 struct {\n    Port        string `env:\"PORT validate:\"numeric\"`\n}\n\ntype Model1 struct {\n    Database    string `env:\"DATABASE\"`\n    Model2      *Model2\n    Model3      Model3\n}\n```\n\nThe nested structs that added via pointer must not be necessarily initialized:\n\n```go\nvar settings Model1\nif err := Load(\u0026settings); err != nil {\n    return err\n}\n```\n\nNonetheless, if you want, you can do it.\n\n```go\nvar settings = Model1{Model2: new(Model2)}\nif err := Load(\u0026settings); err != nil {\n    return err\n}\n```\n\n## 3. Limitations\n\nThe configuration model has some limitations in how it is arranged and used.\n\n### Empty structs are not allowed\n\nIf you add an empty struct to your configuration model, `Load()` returns error.\n\n### Load() accepts only pointer to your configuration model\n\nThe root model must be initialized and added to the `Load()` signature via pointer:\n\n```go\nerr := Load(\u0026EnvironmentSettings)\nif err != nil {\n    return err\n}\n```\n\nOtherwise, the function returns error.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaatinga%2Fsettings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaatinga%2Fsettings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaatinga%2Fsettings/lists"}