{"id":44746210,"url":"https://github.com/helloyi/go-value","last_synced_at":"2026-02-15T22:11:12.670Z","repository":{"id":72158960,"uuid":"218689195","full_name":"helloyi/go-value","owner":"helloyi","description":"Manipulates(gets,sets,convert etc.) interface{} value, convenient and simple, and reflect-based.","archived":false,"fork":false,"pushed_at":"2021-06-23T09:12:54.000Z","size":52,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T03:45:47.095Z","etag":null,"topics":["configuration","go","golang","mapstructure","viper"],"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/helloyi.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-31T05:13:58.000Z","updated_at":"2023-11-03T17:33:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"406b9b0d-3c30-477d-b8b5-230e493c8412","html_url":"https://github.com/helloyi/go-value","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/helloyi/go-value","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloyi%2Fgo-value","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloyi%2Fgo-value/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloyi%2Fgo-value/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloyi%2Fgo-value/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helloyi","download_url":"https://codeload.github.com/helloyi/go-value/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloyi%2Fgo-value/sbom","scorecard":{"id":460518,"data":{"date":"2025-08-11","repo":{"name":"github.com/helloyi/go-value","commit":"6b6ab9a9359a305a8b0bd28529b980d989808fea"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"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":"Code-Review","score":0,"reason":"Found 0/16 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":"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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 '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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T11:00:40.418Z","repository_id":72158960,"created_at":"2025-08-19T11:00:40.418Z","updated_at":"2025-08-19T11:00:40.418Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29490385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["configuration","go","golang","mapstructure","viper"],"created_at":"2026-02-15T22:11:12.186Z","updated_at":"2026-02-15T22:11:12.665Z","avatar_url":"https://github.com/helloyi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Value in go\n\n[![GoDoc](https://godoc.org/github.com/helloyi/go-value?status.svg)](https://godoc.org/github.com/helloyi/go-value) [![Build Status](https://travis-ci.com/helloyi/go-value.svg?branch=master)](https://travis-ci.com/helloyi/go-value) [![Coverage Status](https://coveralls.io/repos/github/helloyi/go-value/badge.svg?branch=master)](https://coveralls.io/github/helloyi/go-value?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/helloyi/go-value)](https://goreportcard.com/report/github.com/helloyi/go-value) ![stability-unstable](https://img.shields.io/badge/stability-unstable-yellow.svg) [![License](https://img.shields.io/github/license/helloyi/go-value)](https://github.com/helloyi/go-value/blob/master/LICENSE)\n\nManipulates(gets,sets,convert etc.) interface{} value, convenient and simple, and reflect-based.\n\n## Features\n\nYou can do the following things, after new Value from interface{} like this `v := value.New(var)`.\n+ Get value from map slice array or struct with key idx or fieldname\n+ Put key value pair to map slice or array\n+ Set value\n+ For range value any type\n+ Get value with Int*, Float*, PList etc.\n+ Numerical type is adaptive when get; example, `i` kind is uint8 and get with Int16() is legal, the value is automatically converted to int16 instead of type mismatch.\n+ Provide `Must*` API, for chaining call and some friendly writing.\n+ Unmarshal to a value with `Value.ConvTo`\n+ Supported covert to time.Duration or time.Time etc..\n+ [ ] Supported convert to frequently used build-in type\n\n## Example\n\n[example_test.go](https://github.com/helloyi/go-value/blob/master/example_test.go)\n\nconvert v to net.IP, time.Duration etc..\n```golang\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net\"\n\t\"time\"\n\n\t\"github.com/helloyi/go-value\"\n)\n\nfunc main() {\n\tx := map[string]interface{}{\n\t\t\"a\": 1,\n\t\t\"B\": \"b\",\n\t\t\"C\": \"c\",\n\t\t\"D\": \"13s\",\n\t\t\"E\": \"Fri Nov 1 19:13:55 +0800 CST 2019\",\n\t\t\"F\": \"8.8.8.8\",\n\t}\n\n\tvar y struct {\n\t\tA int    `value:\"a\"` // set with name \"a\"\n\t\tB int    `value:\"_\"` // passed\n\t\tC string // set with name \"C\"\n\t\tD time.Duration\n\t\tE *time.Time\n\t\tF *net.IP\n\t}\n\n\tv := value.New(x)\n\tif err := v.ConvTo(\u0026y); err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\tfmt.Printf(\"%v\\n\", y)\n\t// Output: {1 0 c 13s 2019-11-01 19:13:55 +0800 CST 8.8.8.8}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelloyi%2Fgo-value","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelloyi%2Fgo-value","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelloyi%2Fgo-value/lists"}