dtype

package module
v0.0.0-...-e9f675b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2021 License: MIT Imports: 3 Imported by: 0

README

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>

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultArrayIntWithNullable

func DefaultArrayIntWithNullable(inputArray []int) ([]int, *[]int)

DefaultArrayIntWithNullable if the value equal is array length 0 returns raw array and nil pointer

func DefaultArrayStringWithNullable

func DefaultArrayStringWithNullable(inputArray []string) ([]string, *[]string)

DefaultArrayStringWithNullable if the value equal is array length 0 returns raw array and nil pointer

func DefaultBooleanWithNullable

func DefaultBooleanWithNullable(inputBoolean bool) (bool, *bool)

DefaultBooleanWithNullable if the value equal is true returns raw boolean and nil pointer

func DefaultFloat64WithNullable

func DefaultFloat64WithNullable(inputFloat float64) (float64, *float64)

DefaultFloat64WithNullable if the value equal is 0.0 returns raw int and nil pointer

func DefaultIntWithNullable

func DefaultIntWithNullable(inputInt int) (int, *int)

DefaultIntWithNullable if the value equal is 0 returns raw int and nil pointer

func DefaultJSONUnstructuredWithNullable

func DefaultJSONUnstructuredWithNullable(inputJSON, key string) (string, *string)

DefaultJSONUnstructuredWithNullable if have key returns raw json and nil pointer

func DefaultStringWithNullable

func DefaultStringWithNullable(inputString string) (string, *string)

DefaultStringWithNullable if the value equal is string empty returns raw sting and nil pointer

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL