{"id":46484882,"url":"https://github.com/leprosus/golang-config","last_synced_at":"2026-03-06T09:12:19.109Z","repository":{"id":57507822,"uuid":"86928785","full_name":"leprosus/golang-config","owner":"leprosus","description":"Golang thread-safe, lock-free JSON configuration wrapper","archived":false,"fork":false,"pushed_at":"2021-07-15T20:29:54.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-08-12T09:28:15.255Z","etag":null,"topics":["config","configuration-reader","golang","json","jsonpath"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leprosus.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-01T17:03:02.000Z","updated_at":"2021-07-15T20:29:57.000Z","dependencies_parsed_at":"2022-09-26T17:50:46.492Z","dependency_job_id":null,"html_url":"https://github.com/leprosus/golang-config","commit_stats":null,"previous_names":[],"tags_count":14,"template":null,"template_full_name":null,"purl":"pkg:github/leprosus/golang-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leprosus%2Fgolang-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leprosus%2Fgolang-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leprosus%2Fgolang-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leprosus%2Fgolang-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leprosus","download_url":"https://codeload.github.com/leprosus/golang-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leprosus%2Fgolang-config/sbom","scorecard":{"id":585447,"data":{"date":"2025-08-18","repo":{"name":"github.com/leprosus/golang-config","commit":"26ae9ec64bddd93d0267e7208d999cb49b251b94"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":3,"checks":[{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: License.md:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: License.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T20:22:45.172Z","repository_id":57507822,"created_at":"2025-08-20T20:22:45.172Z","updated_at":"2025-08-20T20:22:45.172Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30168653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"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-reader","golang","json","jsonpath"],"created_at":"2026-03-06T09:12:18.617Z","updated_at":"2026-03-06T09:12:19.099Z","avatar_url":"https://github.com/leprosus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golang thread-safe, lock-free JSON configuration reader\n\n## Import\n```go\nimport \"github.com/leprosus/golang-config\"\n```\n\n## Create new configuration reader\n\n```go\ncfg := config.Init(\"./config.json\")\n\n// To print debug information in stdout\ncfg.Stdout(true)\n```\n\n## Json example\n\n```json\n{\n    \"string\": \"text\",\n    \"digit\": {\n        \"one\": 1,\n        \"two\": 2\n    },\n    \"flag\": true,\n    \"emails\": [\n        \"user1@domain\",\n        \"user2@domain\"\n    ]\n}\n```\n\nNB: to get config values to need to use simple json-path requests [jsonpath.com](http://jsonpath.com)\n\n## Getting example\n\n```go\ncfg := config.Init(\"./config.json\", 60)\n\ntext := cfg.String(\"string\")\none := cfg.Int(\"digit.one\")\ntwo := cfg.Int(\"digit.two\")\nflag := cfg.Bool(\"flag\")\nemails := cfg.List(\"emails\")\n```\n\n## List all methods\n\n### Initialization\n\n* config.Init(path) - initializes configuration loading.\n* config.Stdout(mode) - to set out all debug information into stdout.\n* config.Debug(func(message string)) - sets custom logger for debug.\n* config.Info(func(message string)) - sets custom logger for info.\n* config.Warn(func(message string)) - sets custom logger for warn.\n* config.Error(func(message string)) - sets custom logger for error.\n* config.Refresh(func()) - adds callback on refresh.\n\n### Getting data\n\n* cgf.String(\"json.path\") - returns string value by json path.\n* cgf.StringOrDefault(\"json.path\", \"default\") - returns string value by json path or default value.\n* cgf.Bool(\"json.path\") - returns bool value by json path.\n* cgf.BoolOrDefault(\"json.path\", false) - returns bool value by json path or default value.\n* cgf.Int32(\"json.path\") - returns int32 value by json path.\n* cgf.Int32OrDefault(\"json.path\", 0) - returns int32 value by json path or default value.\n* cgf.UInt32(\"json.path\") - returns uint32 value by json path.\n* cgf.UInt32OrDefault(\"json.path\", 0) - returns uint32 value by json path or default value.\n* cgf.Int64(\"json.path\") - returns int64 value by json path.\n* cgf.Int64OrDefault(\"json.path\", 0) - returns int64 value by json path or default value.\n* cgf.UInt64(\"json.path\") - returns uint64 value by json path.\n* cgf.UInt64OrDefault(\"json.path\", 0) - returns uint64 value by json path or default value.\n* cgf.Float32(\"json.path\") - returns float32 value by json path.\n* cgf.Float32OrDefault(\"json.path\", 0) - returns float32 value by json path or default value.\n* cgf.Float64(\"json.path\") - returns float64 value by json path.\n* cgf.Float64OrDefault(\"json.path\", 0) - returns float64 value by json path or default value.\n* cgf.List(\"json.path\") - returns strings array by json path.\n* cgf.ListOrDefault(\"json.path\", []string{\"\"}) - returns strings array by json path or default value.\n* cgf.Slice(path string) - returns slice of interfaces by json path.\n* cgf.SliceOrDefault(path string, defVal []interface{}) - returns slice of interfaces by json path or default value.\n* cgf.Map(\"json.path\") - returns map[string]interface by json path.  \n* cgf.MapOrDefault(\"json.path\") - returns map[string]interface by json path or default value. \n* cgf.Duration(\"json.path\") - returns duration in seconds by json path.\n* cgf.DurationOrDefault(\"json.path\", time.Second) - returns duration in seconds by json path or default value.\n* cgf.Interface(\"json.path\") - returns interface by json path.\n* cgf.InterfaceOrDefault(\"json.path\", \"\") - returns interface by json path or default value.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleprosus%2Fgolang-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleprosus%2Fgolang-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleprosus%2Fgolang-config/lists"}