{"id":29440831,"url":"https://github.com/devkcud/salvation","last_synced_at":"2025-07-13T12:15:51.906Z","repository":{"id":303695430,"uuid":"1016352425","full_name":"devkcud/salvation","owner":"devkcud","description":"💀 A generic Go wrapper for optional values, inspired by Rust's Option and Haskell's Maybe. Brings Possibly[T] to your codebase for safe, expressive nothingness.","archived":false,"fork":false,"pushed_at":"2025-07-09T00:07:25.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-09T00:26:57.276Z","etag":null,"topics":["functional-programming","generics","golang","maybe","monads-but-shhh","nullable","option","zero-values"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devkcud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-07-08T22:08:09.000Z","updated_at":"2025-07-09T00:08:06.000Z","dependencies_parsed_at":"2025-07-09T00:27:00.750Z","dependency_job_id":"1c5651fb-68ef-42ae-a283-ba7539f677d2","html_url":"https://github.com/devkcud/salvation","commit_stats":null,"previous_names":["devkcud/salvation"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/devkcud/salvation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkcud%2Fsalvation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkcud%2Fsalvation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkcud%2Fsalvation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkcud%2Fsalvation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devkcud","download_url":"https://codeload.github.com/devkcud/salvation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkcud%2Fsalvation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265137053,"owners_count":23716783,"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":["functional-programming","generics","golang","maybe","monads-but-shhh","nullable","option","zero-values"],"created_at":"2025-07-13T12:15:50.193Z","updated_at":"2025-07-13T12:15:51.889Z","avatar_url":"https://github.com/devkcud.png","language":"Go","readme":"# 🌀 Salvation\n\n`salvation` is a package containing a generic Go wrapper for optional values.\n\nInspired by Rust's `Option\u003cT\u003e` and Haskell's `Maybe`, `Possibly[T]` gives you a way to wrap things that may or may not exist, and then reflect on their Nothingness.\n\n## ✨ Features\n\n- Generic support for any type `T`\n- Reflection-powered nil checking\n- Precomputable \"Nothingness\" for less overhead\n- Configurable rules (empty slices can be something... if you _believe_)\n- Matcher flow control\n- Fully documented (yes, this is a feature)\n\n## 🧠 Why?\n\nHonestly? I don't know. But it seemed fun enough to build.\n\n## 🚀 Usage\n\nUsage examples below. A full Wiki is coming soon (probably just so I can pretend it matters).\n\n```go\nopt := salvation.NewPossibility[*MyStruct](nil)\n\nif opt.IsSomething() {\n    // yay!\n}\n\nif opt.IsNothing() {\n    // aww!\n}\n```\n\n```go\nopt.Match().\n    Case(func(v int) bool { return v \u003e 10 }, func(v int) { fmt.Println(\"Large number\", v) }).\n    Default(func(_ Possibly[int]) {\n        fmt.Println(\"Nothing matched. Or maybe there was Nothing at all.\")\n    })\n```\n\n## 🫠 Contributing\n\nThinking of contributing? That's adorable.\n\nBefore submitting a PR, feature request, or unhinged philosophical improvement, please consult the [`CONTRIBUTING.md`](CONTRIBUTING.md). It's full of helpful guidelines, emotional red flags, and vague threats.\n\nIf you're still interested after reading it, I can't stop you. No one can.\n\n## ⭐️ Validation\n\nIf this repo made you feel something (anything at all) you can click the star. It won't fix your life, but it'll make this repo slightly more visible to other souls.\n\n\u003e I made this section against my own will...\n\n## 🧯 License\n\nThis project uses **The Unlicense** license (just copy and paste into your code and believe in yourself)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevkcud%2Fsalvation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevkcud%2Fsalvation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevkcud%2Fsalvation/lists"}