{"id":17606285,"url":"https://github.com/noamt/goptr","last_synced_at":"2025-03-29T23:16:04.390Z","repository":{"id":57511806,"uuid":"239554411","full_name":"noamt/goptr","owner":"noamt","description":"Pointer utilities for go","archived":false,"fork":false,"pushed_at":"2020-02-11T11:09:24.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T00:41:27.835Z","etag":null,"topics":["go","golang","pointer","pointers","ptr","util","utility"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noamt.png","metadata":{"files":{"readme":"README.asciidoc","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}},"created_at":"2020-02-10T16:11:48.000Z","updated_at":"2020-07-14T11:49:52.000Z","dependencies_parsed_at":"2022-08-29T05:21:37.983Z","dependency_job_id":null,"html_url":"https://github.com/noamt/goptr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noamt%2Fgoptr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noamt%2Fgoptr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noamt%2Fgoptr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noamt%2Fgoptr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noamt","download_url":"https://codeload.github.com/noamt/goptr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246254146,"owners_count":20747949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","golang","pointer","pointers","ptr","util","utility"],"created_at":"2024-10-22T15:44:10.554Z","updated_at":"2025-03-29T23:16:04.370Z","avatar_url":"https://github.com/noamt.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"= goptr\n\nimage:https://circleci.com/gh/noamt/goptr.svg?style=svg[\"CircleCI\", link=\"https://circleci.com/gh/noamt/goptr\"]\n\nA utility package for Go pointers\n\n== Pointer Resolution\n\nIn this package there are helper methods for resolving pointers of primitive types, with a fallback to a default value.\n\nFor example, resolving a pointer to a string:\n[source,go]\n----\nimport \"github.com/noamt/goptr\"\n\ngoptr.String(nil) // Returns an empty string\ngoptr.String(\"foo\") // Returns \"foo\"\n\ngoptr.StringOrDefault(nil, \"foo\") // Returns \"foo\"\n\ns := \"bar\"\ngoptr.StringOrDefault(\u0026s, \"foo\") // Returns \"bar\"\n----","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoamt%2Fgoptr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoamt%2Fgoptr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoamt%2Fgoptr/lists"}