{"id":21465174,"url":"https://github.com/yurisasuke/nulls","last_synced_at":"2025-06-16T08:33:58.064Z","repository":{"id":110279823,"uuid":"148838499","full_name":"yurisasuke/nulls","owner":"yurisasuke","description":null,"archived":false,"fork":false,"pushed_at":"2018-09-14T20:57:06.000Z","size":1,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T05:44:52.538Z","etag":null,"topics":["go","golang","json","sql"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yurisasuke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-09-14T20:28:18.000Z","updated_at":"2018-09-15T14:47:04.000Z","dependencies_parsed_at":"2023-03-21T14:18:13.583Z","dependency_job_id":null,"html_url":"https://github.com/yurisasuke/nulls","commit_stats":null,"previous_names":["yurisasuke/nulls"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yurisasuke/nulls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurisasuke%2Fnulls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurisasuke%2Fnulls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurisasuke%2Fnulls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurisasuke%2Fnulls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yurisasuke","download_url":"https://codeload.github.com/yurisasuke/nulls/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurisasuke%2Fnulls/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260126642,"owners_count":22962668,"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","json","sql"],"created_at":"2024-11-23T08:08:50.501Z","updated_at":"2025-06-16T08:33:58.045Z","avatar_url":"https://github.com/yurisasuke.png","language":"Go","readme":"# Nulls\nNulls is a simple library that helps you to marshal null database values to there default zero values in golang.\n\n\n\n# nulls.NullString\nFor string field that you know that may contain a null value use (nulls.NullString) instead of (sql.NullString)or string.\nThis will marshal  to  \"\" for all null string.You can easily change this behaviour to whatever you wish your null strings to marshal  to.\n\n## Example\n```go\ntype Pojo struct {\n\tID   uint `json:\"id\"`\n\tContent  NullString `json:\"content\"`\n\t\n}\n```\n\n### nulls.NullInt64\nThis will marshal  to 0 for all null Int64 fields.This is a replacement of the sql..NullInt64.If you want to change this behaviour you can easily change it.\n\n### Example usage\n```go\ntype Pojo struct {\n\tID   uint `json:\"id\"`\n  Complete    NullInt64   `json:\"complete\"`\n\t\n\t\n}\n```\n\n### nulls.NullFloat64\nThis will return 0.0 for all null Float64  fields.\n\n### Example usage\n```go\ntype Pojo struct {\n\tID   uint `json:\"id\"`\n  Price    nulls.NullFloat64  `json:\"complete\"`\n\t\t\n}\n```\n\n### nulls.NullBool\nThis will marshal to  false for all null bool  fields.\n\n### Example usage\n```go\ntype Pojo struct {\n\tID   uint `json:\"id\"`\n  Status    nulls.NullBool  `json:\"status\"`\n\t\t\n}\n```\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurisasuke%2Fnulls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyurisasuke%2Fnulls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurisasuke%2Fnulls/lists"}