{"id":27064164,"url":"https://github.com/emptyless/nullify","last_synced_at":"2025-04-05T16:37:20.672Z","repository":{"id":230018578,"uuid":"778178277","full_name":"Emptyless/nullify","owner":"Emptyless","description":"Return the pointer version of any input (including changing the fields of structs to pointer versions)","archived":false,"fork":false,"pushed_at":"2024-06-10T11:00:33.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-22T03:39:34.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Emptyless.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":"2024-03-27T08:25:19.000Z","updated_at":"2024-06-10T11:00:09.000Z","dependencies_parsed_at":"2024-04-22T13:45:34.782Z","dependency_job_id":"642bb380-1e98-4cbb-9280-530f4ce8966c","html_url":"https://github.com/Emptyless/nullify","commit_stats":null,"previous_names":["emptyless/nullify"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fnullify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fnullify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fnullify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fnullify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Emptyless","download_url":"https://codeload.github.com/Emptyless/nullify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369561,"owners_count":20927921,"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":[],"created_at":"2025-04-05T16:37:20.267Z","updated_at":"2025-04-05T16:37:20.658Z","avatar_url":"https://github.com/Emptyless.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nullify\n\nReturns the pointer version of any input recursively including e.g. field structs (while retaining tags). This is especially\nuseful in e.g. JSON serialization/deserialization in combination with a struct validator to check if a field was sent or not\nwithout changing the struct.\n\n## Install\n\nUse `github.com/Emptyless/nullify` to download the latest version.\n\n\n## Example\n\nTo quickly get up and running, run e.g. the following:\n\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/go-playground/validator/v10\"\n)\n\ntype Person struct {\n\tName string `json:\"name\" validate:\"required\"`\n}\n\nfunc main() {\n\tinput := []byte(\"\")\n\tperson := Person{}\n\tp := Nullify(person)\n\t_ = json.Unmarshal(input, p)\n\terr := validator.New().Struct(p)\n\tfmt.Println(err)\n\t// Output:\n\t// Key: 'Name' Error:Field validation for 'Name' failed on the 'required' tag\n}\n```\n\nFor the full example, see  `/example` for an example with [go-playground/validator](https://github.com/go-playground/validator).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femptyless%2Fnullify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femptyless%2Fnullify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femptyless%2Fnullify/lists"}