{"id":13786667,"url":"https://github.com/xorcare/pointer","last_synced_at":"2026-01-28T12:32:55.726Z","repository":{"id":42652561,"uuid":"218931647","full_name":"xorcare/pointer","owner":"xorcare","description":"Helper routines for simplifying the creation of optional fields of basic type.","archived":false,"fork":false,"pushed_at":"2026-01-14T21:55:56.000Z","size":38,"stargazers_count":48,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-15T02:52:26.979Z","etag":null,"topics":["go","godoc","golang","helper-routines","point","pointer","pointers"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/xorcare/pointer","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/xorcare.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}},"created_at":"2019-11-01T07:04:56.000Z","updated_at":"2025-12-30T07:45:31.000Z","dependencies_parsed_at":"2024-12-02T19:30:48.234Z","dependency_job_id":"3b686db3-dd66-4620-84fc-3c253e4880b3","html_url":"https://github.com/xorcare/pointer","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"5c8fb1b0c6db07105bc9594163fb56e0b16dbf41"},"previous_names":["xorcare/pointer.go"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/xorcare/pointer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorcare%2Fpointer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorcare%2Fpointer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorcare%2Fpointer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorcare%2Fpointer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xorcare","download_url":"https://codeload.github.com/xorcare/pointer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorcare%2Fpointer/sbom","scorecard":{"id":1240889,"data":{"date":"2025-12-29","repo":{"name":"github.com/xorcare/pointer","commit":"b187755e0c7d1e354af0b2bc0f83f2c7020bb0be"},"scorecard":{"version":"v5.4.1-0.20251227023010-525a93017816","commit":"525a93017816fa74238c545bdecac6af16ce00f1"},"score":3.8,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.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/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#token-permissions"}},{"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/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/18 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/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#code-review"}},{"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/go.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/xorcare/pointer/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/xorcare/pointer/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/xorcare/pointer/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/xorcare/pointer/go.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/xorcare/pointer/go.yml/main?enable=pin","Info:   0 out of   4 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/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#pinned-dependencies"}},{"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/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"1 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/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#maintained"}},{"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/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#binary-artifacts"}},{"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/525a93017816fa74238c545bdecac6af16ce00f1/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/525a93017816fa74238c545bdecac6af16ce00f1/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/525a93017816fa74238c545bdecac6af16ce00f1/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/525a93017816fa74238c545bdecac6af16ce00f1/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/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#signed-releases"}},{"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/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/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 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#sast"}}]},"last_synced_at":"2026-01-03T06:52:56.426Z","repository_id":42652561,"created_at":"2026-01-03T06:52:56.426Z","updated_at":"2026-01-03T06:52:56.426Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"last_error":"SSL_read: 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":["go","godoc","golang","helper-routines","point","pointer","pointers"],"created_at":"2024-08-03T19:01:27.637Z","updated_at":"2026-01-28T12:32:55.708Z","avatar_url":"https://github.com/xorcare.png","language":"Go","readme":"# pointer\n\n[![Go workflow status badge](https://github.com/xorcare/pointer/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/xorcare/pointer/actions/workflows/go.yml)\n[![codecov](https://codecov.io/gh/xorcare/pointer/badge.svg?branch=main)](https://codecov.io/gh/xorcare/pointer/tree/main)\n[![Go Report Card](https://goreportcard.com/badge/github.com/xorcare/pointer)](https://goreportcard.com/report/github.com/xorcare/pointer)\n[![GoDoc](https://godoc.org/github.com/xorcare/pointer?status.svg)](https://pkg.go.dev/github.com/xorcare/pointer)\n\nPackage pointer contains helper routines for simplifying the creation\nof optional fields of basic type.\n\n## A little copying is better than a little dependency\n\nWith the advent of generics in go 1.18, using this library in your code is\nlikely to be unwarranted, I recommend that you make a small local copy of this\nlibrary, for example:\n\nPut the code below in the file: `internal/pointer/pointer.go` and use it at\nyour own pleasure.\n\n```go\npackage pointer\n\n// Of is a helper routine that allocates a new any value\n// to store v and returns a pointer to it.\nfunc Of[Value any](v Value) *Value {\n    return \u0026v\n}\n```\n\n## Installation\n\n```bash\ngo get github.com/xorcare/pointer\n```\n\n## Generics\n\nStarting with Go 18+, you can use the `Of` method to get pointers to values of any types.\n\n## Examples\n\nExamples of using the library are presented on [godoc.org][GDE]\nand in the [source library code][SCE].\n\n## FAQ\n\n| Question                                                              | Source                                               |\n|-----------------------------------------------------------------------|------------------------------------------------------|\n| How to set **bool** pointer in a struct literal or variable?          | `var _ *bool = pointer.Bool(true)`                   |\n| How to set **byte** pointer in a struct literal or variable?          | `var _ *byte = pointer.Byte(1)`                      |\n| How to set **complex64** pointer in a struct literal or variable?     | `var _ *complex64 = pointer.Complex64(1.1)`          |\n| How to set **complex128** pointer in a struct literal or variable?    | `var _ *complex128 = pointer.Complex128(1.1)`        |\n| How to set **float32** pointer in a struct literal or variable?       | `var _ *float32 = pointer.Float32(1.1)`              |\n| How to set **float64** pointer in a struct literal or variable?       | `var _ *float64 = pointer.Float64(1.1)`              |\n| How to set **int** pointer in a struct literal or variable?           | `var _ *int = pointer.Int(1)`                        |\n| How to set **int8** pointer in a struct literal or variable?          | `var _ *int8 = pointer.Int8(8)`                      |\n| How to set **int16** pointer in a struct literal or variable?         | `var _ *int16 = pointer.Int16(16)`                   |\n| How to set **int32** pointer in a struct literal or variable?         | `var _ *int32 = pointer.Int32(32)`                   |\n| How to set **int64** pointer in a struct literal or variable?         | `var _ *int64 = pointer.Int64(64)`                   |\n| How to set **rune** pointer in a struct literal or variable?          | `var _ *rune = pointer.Rune(1)`                      |\n| How to set **string** pointer in a struct literal or variable?        | `var _ *string = pointer.String(\"ptr\")`              |\n| How to set **uint** pointer in a struct literal or variable?          | `var _ *uint = pointer.Uint(1)`                      |\n| How to set **uint8** pointer in a struct literal or variable?         | `var _ *uint8 = pointer.Uint8(8)`                    |\n| How to set **uint16** pointer in a struct literal or variable?        | `var _ *uint16 = pointer.Uint16(16)`                 |\n| How to set **uint32** pointer in a struct literal or variable?        | `var _ *uint32 = pointer.Uint32(32)`                 |\n| How to set **uint64** pointer in a struct literal or variable?        | `var _ *uint64 = pointer.Uint64(64)`                 |\n| How to set **time.Time** pointer in a struct literal or variable?     | `var _ *time.Time = pointer.Time(time.Now())`        |\n| How to set **time.Duration** pointer in a struct literal or variable? | `var _ *time.Duration = pointer.Duration(time.Hour)` |\n\n## License\n\n© 2019-2020,2022 Vasiliy Vasilyuk \u003cxorcare@gmail.com\u003e\n\nReleased under the [BSD 3-Clause License].\n\n[BSD 3-Clause License]: https://github.com/xorcare/pointer/blob/main/LICENSE 'BSD 3-Clause \"New\" or \"Revised\" License'\n[GDE]: https://godoc.org/github.com/xorcare/pointer#pkg-examples 'Examples of using package pointer'\n[SCE]: https://github.com/xorcare/pointer/blob/main/example_test.go 'Source code examples of using package pointer'\n","funding_links":[],"categories":["Utilities","公用事业公司"],"sub_categories":["Utility/Miscellaneous","Fail injection","实用程序/Miscellaneous"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxorcare%2Fpointer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxorcare%2Fpointer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxorcare%2Fpointer/lists"}