aofdev / dtype

The default value of types can be nullable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dtype

Golang 1.15 Linter Go Report Card codecov

⚙️ Installation

go get -u github.com/aofdev/dtype

⚡️ Quickstart

package main

import (
	"fmt"

	d "github.com/aofdev/dtype"
)

const text = ""

func main() {
	value, isNull := d.DefaultStringWithNullable(text)
	fmt.Printf("value: %v isNull: %v", value, isNull)
}

//output: value:  isNull: <nil>

About

The default value of types can be nullable

License:MIT License


Languages

Language:Go 100.0%