guregu / null

reasonable handling of nullable values
BSD 2-Clause "Simplified" License
1.86k stars 238 forks source link

func to create empty null #24

Closed rakateja closed 7 years ago

rakateja commented 7 years ago

Summary

Inspired by Java8 Optional & Scala Option, need to add function to create empty null.

Usage

String

nullStr := null.NullString()
nullStr.Valid // should be invalid

Float

nullFloat := null.NullFloat()
nullFloat.Valid // should be invalid