SkillAgentSearch skills...

Nilable

nilable is a tiny Go generics library for making non-nilable values nilable

Install / Use

/learn @otterize/Nilable
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

nilable

nilable is a tiny Go generics library for making non-nilable values nilable, and supports JSON serialization.

You too can stop using pointers when you don't need them!

From value to JSON

nilableString := nilable.From("hello world")
println(nilableString.Set) // true
println(nilableString.Item) // "hello world"
data, _ := json.Marshal(nilableString)
println(string(data)) // `"hello world"` 

From null JSON to value

var nilableString Nilable[string]
json.Unmarshal([]byte("null"), &nilJson)
println(nilJson.Set) // false
View on GitHub
GitHub Stars12
CategoryDevelopment
Updated2mo ago
Forks0

Languages

Go

Security Score

90/100

Audited on Jan 9, 2026

No findings