nilutil

package
v1.0.0-preview.4 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(arg interface{}) bool

IsNil does proper nil check for interface{} values taken from users "== nil" check for interfaces are not enough when an nil pointer is assigned to interface, it returns false from "== nil" check Example: var pnt *int var inf interface{} inf = pnt fmt.Println(inf == nil) // false fmt.Println(isNil(inf)) // true

Types

This section is empty.

Jump to

Keyboard shortcuts

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