{"id":28701985,"url":"https://github.com/disgoorg/omit","last_synced_at":"2025-06-14T12:09:15.816Z","repository":{"id":277726260,"uuid":"933310053","full_name":"disgoorg/omit","owner":"disgoorg","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-19T10:30:48.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-04T09:14:18.022Z","etag":null,"topics":["golang","omit","optional-type"],"latest_commit_sha":null,"homepage":"","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/disgoorg.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}},"created_at":"2025-02-15T16:48:47.000Z","updated_at":"2025-04-19T10:01:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"d76c83e5-ea7b-4c13-8afb-3e6556e9fdcf","html_url":"https://github.com/disgoorg/omit","commit_stats":null,"previous_names":["disgoorg/omit"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/disgoorg/omit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disgoorg%2Fomit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disgoorg%2Fomit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disgoorg%2Fomit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disgoorg%2Fomit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/disgoorg","download_url":"https://codeload.github.com/disgoorg/omit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disgoorg%2Fomit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259813025,"owners_count":22915201,"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":["golang","omit","optional-type"],"created_at":"2025-06-14T12:09:15.199Z","updated_at":"2025-06-14T12:09:15.804Z","avatar_url":"https://github.com/disgoorg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Reference](https://pkg.go.dev/badge/github.com/disgoorg/omit.svg)](https://pkg.go.dev/github.com/disgoorg/omit)\n[![Go Report](https://goreportcard.com/badge/github.com/disgoorg/omit)](https://goreportcard.com/report/github.com/disgoorg/omit)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/disgoorg/omit)](https://golang.org/doc/devel/release.html)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/disgoorg/omit/blob/master/LICENSE)\n[![omit Version](https://img.shields.io/github/v/tag/disgoorg/omit?label=release)](https://github.com/disgoorg/omit/releases/latest)\n[![Discord](https://discord.com/api/guilds/817327181659111454/widget.png)](https://discord.gg/9tKpqXjYVC)\n\n# omit\n\nomit is a simple library to handle optional and nullable struct field values for json serialization and deserialization in golang.\n\n## Installation\n\n```bash\ngo get github.com/disgoorg/omit\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/disgoorg/omit\"\n)\n\ntype User struct {\n\tID    int                `json:\"id\"`\n\tName  string             `json:\"name\"`\n\tEmail omit.Omit[*string] `json:\"email,omitzero\"`\n}\n\nfunc main() {\n\tu := User{\n\t\tID:    1,\n\t\tName:  \"John Doe\",\n\t\tEmail: omit.NewPtr(\"test@example.com\"),\n\t}\n\n\t// Marshal\n\tdata, err := json.Marshal(u)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(string(data))\n}\n```\n\n## Documentation\n\nDocumentation is wip and can be found under:\n\n* [![Go Reference](https://pkg.go.dev/badge/github.com/disgoorg/omit.svg)](https://pkg.go.dev/github.com/disgoorg/omit)\n\n## Troubleshooting\n\nFor help feel free to open an issue or reach out on [Discord](https://discord.gg/9tKpqXjYVC)\n\n## Contributing\n\nContributions are welcomed but for bigger changes we recommend first reaching out via [Discord](https://discord.gg/9tKpqXjYVC) or create an issue to discuss your problems, intentions and ideas.\n\n## License\n\nDistributed under the [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE). See LICENSE for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisgoorg%2Fomit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdisgoorg%2Fomit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisgoorg%2Fomit/lists"}