package
module
Version:
v0.0.0-...-a3e678e
Opens a new window with list of versions in this module.
Published: Dec 24, 2016
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
iszero

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
¶
func Value(src interface{}) bool
Value returns whether the passed-in value is equal to its type's zero value.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.