iszero

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

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

Go to latest
Published: Dec 24, 2016 License: MIT Imports: 1 Imported by: 0

README

iszero Build Status Coverage Status GoDoc

This Go package checks if a value is equal to its type's zero value.

Example

iszero.Value("") // true
iszero.Value(42) // false

iszero.Value(time.Time{}) // true
iszero.Value(time.Now())  // false

iszero.Value(reflect.ValueOf("")) // true
iszero.Value(reflect.ValueOf(42)) // false

Install

go get github.com/stephanos/iszero

Documentation

godoc.org

License

MIT (see LICENSE).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Value

func Value(src interface{}) bool

Value returns whether the passed-in value is equal to its type's zero value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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