Skip to content

Nullish is type helper fo handle null in golang. its support null for primitive data types and also another data type.

License

Notifications You must be signed in to change notification settings

sutantodadang/nullish

Repository files navigation

Nullish

Go Reference

MIT License

Nullish is type helper fo handle null in golang. its support null for primitive data types and also another data type.

Warning ⚠️

This project is used by my companies on production and there is not enough time to make unit testing so maybe something not work for you. use at your own risk.

Installation

  go get -u github.com/sutantodadang/nullish

Features

  • NullString
  • NullJsonb / Json
  • NullInt
  • NullFloat
  • NullBool
  • NullUUID
  • NullTime
  • NullULID

Usage/Examples

  • nullstring
import "github.com/sutantodadang/nullish"

type foo struct {
    bar nullish.NullString

}

// you can also defined default value
foo.bar = nullish.NewNullString("hello", true)

Authors

About

Nullish is type helper fo handle null in golang. its support null for primitive data types and also another data type.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages