{"id":49263119,"url":"https://github.com/go-pogo/rawconv","last_synced_at":"2026-04-25T08:40:06.853Z","repository":{"id":59045522,"uuid":"530324154","full_name":"go-pogo/rawconv","owner":"go-pogo","description":"Package rawconv contains everything needed to create (custom) types which can unmarshal raw string values into any type in Go.","archived":false,"fork":false,"pushed_at":"2025-10-01T11:36:15.000Z","size":192,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T13:43:03.402Z","etag":null,"topics":["decode","encode","go","golang","marshal","parse","parser","types","unmarshal"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-pogo.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["roeldev"]}},"created_at":"2022-08-29T17:31:48.000Z","updated_at":"2025-10-01T08:03:27.000Z","dependencies_parsed_at":"2024-01-02T19:43:00.495Z","dependency_job_id":"c56cf69e-8ad2-441b-be57-2dbac50c3ee2","html_url":"https://github.com/go-pogo/rawconv","commit_stats":null,"previous_names":["go-pogo/rawconv","go-pogo/parseval","go-pogo/rawvalue"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/go-pogo/rawconv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-pogo%2Frawconv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-pogo%2Frawconv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-pogo%2Frawconv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-pogo%2Frawconv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-pogo","download_url":"https://codeload.github.com/go-pogo/rawconv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-pogo%2Frawconv/sbom","scorecard":{"id":432363,"data":{"date":"2025-08-11","repo":{"name":"github.com/go-pogo/rawconv","commit":"217e66bc7c1d2bcfda9ce665b53869a2cd2ee34a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","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/28 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":"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":"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":"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":"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/lint.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/go-pogo/rawconv/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/go-pogo/rawconv/lint.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/go-pogo/rawconv/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/go-pogo/rawconv/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/go-pogo/rawconv/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/go-pogo/rawconv/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/go-pogo/rawconv/test.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/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: BSD 3-Clause \"New\" or \"Revised\" 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 '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":"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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"}}]},"last_synced_at":"2025-08-19T03:40:50.357Z","repository_id":59045522,"created_at":"2025-08-19T03:40:50.360Z","updated_at":"2025-08-19T03:40:50.360Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32256213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T04:23:17.126Z","status":"ssl_error","status_checked_at":"2026-04-25T04:21:53.360Z","response_time":59,"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":["decode","encode","go","golang","marshal","parse","parser","types","unmarshal"],"created_at":"2026-04-25T08:40:06.149Z","updated_at":"2026-04-25T08:40:06.828Z","avatar_url":"https://github.com/go-pogo.png","language":"Go","funding_links":["https://github.com/sponsors/roeldev"],"categories":[],"sub_categories":[],"readme":"rawconv\n=======\n[![Latest release][latest-release-img]][latest-release-url]\n[![Build status][build-status-img]][build-status-url]\n[![Go Report Card][report-img]][report-url]\n[![Documentation][doc-img]][doc-url]\n\n[latest-release-img]: https://img.shields.io/github/release/go-pogo/rawconv.svg?label=latest\n\n[latest-release-url]: https://github.com/go-pogo/rawconv/releases\n\n[build-status-img]: https://github.com/go-pogo/rawconv/actions/workflows/test.yml/badge.svg\n\n[build-status-url]: https://github.com/go-pogo/rawconv/actions/workflows/test.yml\n\n[report-img]: https://goreportcard.com/badge/github.com/go-pogo/rawconv\n\n[report-url]: https://goreportcard.com/report/github.com/go-pogo/rawconv\n\n[doc-img]: https://godoc.org/github.com/go-pogo/rawconv?status.svg\n\n[doc-url]: https://pkg.go.dev/github.com/go-pogo/rawconv\n\n\nPackage `rawconv` implements conversions to and from raw string representations of any (custom) data type in Go.\n\nIncluded features are:\n\n- Convert from raw string to out of the box supported types, and vice versa:\n    * `string`, `rune`\n    * `bool`\n    * `int`, `int8`, `int16`, `int32`, `int64`\n    * `uint`, `uint8`, `uint16`, `uint32`, `uint64`\n    * `float32`, `float64`\n    * `complex64`, `complex128`\n    * `array`, `slice`\n    * `map`\n    * `time.Duration`\n    * `url.URL`\n    * `encoding.TextUnmarshaler`, `encoding.TextMarshaler`\n- Globally add support for your own custom types\n- Or isolate support for your own custom types via `Marshaler` and `Unmarshaler` instances\n\n\u003chr\u003e\n\n```sh\ngo get github.com/go-pogo/rawconv\n```\n\n```go\nimport \"github.com/go-pogo/rawconv\"\n```\n\n## Usage\n\nBelow example demonstrates how to unmarshal a raw `string` into a `time.Duration` type using `Unmarshal`.\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"time\"\n    \n    \"github.com/go-pogo/rawconv\"\n)\n\nfunc main() {\n    var duration time.Duration\n    if err := rawconv.Unmarshal(\"1h2m3s\", \u0026duration); err != nil {\n        panic(err)\n    }\n\n    fmt.Println(duration)\n    // Output: 1h2m3s\n}\n```\n\n### Array, slice and map conversions\n\nConversions to `array`, `slice` or `map` are done by splitting the raw string. The separator can be set via the\n`Options` type and defaults to `DefaultItemsSeparator`. For maps there is also a separator for the key-value pairs,\nwhich defaults to `DefaultKeyValueSeparator`.\nValues within the `array`, `slice`, or `map` are unmarshaled using the called `Unmarshaler`. This is also done for keys\nof maps.\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"reflect\"\n    \n    \"github.com/go-pogo/rawconv\"\n)\n\nfunc main() {\n    var u rawconv.Unmarshaler\n    u.ItemsSeparator = \";\"\n\n    var list []string\n    if err := u.Unmarshal(\"foo;bar\", reflect.ValueOf(\u0026list)); err != nil {\n        panic(err)\n    }\n\n    fmt.Println(list)\n    // Output: [foo bar]\n}\n```\n\n\u003e Nested arrays are currently not supported.\n\n### Structs\n\nThis package does not contain any logic for traversing `struct` types, because the implementation would really depend\non the use case. However, it is possible to incorporate this package in your own struct unmarshaling logic.\n\n### Custom types\n\nCustom types are supported in two ways; by implementing the `encoding.TextUnmarshaler` and/or `encoding.TextMarshaler`\ninterfaces, or by registering a `MarshalFunc` with `RegisterMarshalFunc` and/or an `UnmarshalFunc` with\n`RegisterUnmarshalFunc`.\nIf you do not wish to globally expose your `MarshalFunc` or`UnmarshalFunc` implementations, it is possible to register\nthem to a new `Marshaler` or `Unmarshaler` and use those instances in your application instead.\n\n```go\npackage main\n\nimport (\n    \"reflect\"\n    \n    \"github.com/davecgh/go-spew/spew\"\n    \"github.com/go-pogo/rawconv\"\n)\n\nfunc main() {\n    type myType struct {\n        something string\n    }\n\n    var u rawconv.Unmarshaler\n    u.Register(reflect.TypeOf(myType{}), func(val rawconv.Value, dest any) error {\n        mt := dest.(*myType)\n        mt.something = val.String()\n        return nil\n    })\n\n    var target myType\n    if err := u.Unmarshal(\"some value\", reflect.ValueOf(\u0026target)); err != nil {\n        panic(err)\n    }\n\n    spew.Dump(target)\n    // Output:\n    // (rawconv.myType) {\n    //  something: (string) (len=10) \"some value\"\n    // }\n}\n```\n\n## Documentation\n\nAdditional detailed documentation is available at [pkg.go.dev][doc-url]\n\n## Created with\n\n\u003ca href=\"https://www.jetbrains.com/?from=go-pogo\" target=\"_blank\"\u003e\u003cimg src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/GoLand_icon.png\" width=\"35\" /\u003e\u003c/a\u003e\n\n## License\n\nCopyright © 2022-2025 [Roel Schut](https://roelschut.nl). All rights reserved.\n\nThis project is governed by a BSD-style license that can be found in the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-pogo%2Frawconv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-pogo%2Frawconv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-pogo%2Frawconv/lists"}