iface

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func If

func If(cond bool, i1, i2 interface{}) interface{}

func IsNil

func IsNil(i interface{}) bool

IsNil is a safe test for nil for any kind of variable, and will not panic If i points to a nil object, it will return true, as opposed to i==nil which will return false

Example
package main

import (
	"fmt"
	"github.com/goradd/goradd/pkg/iface"
)

func main() {
	fmt.Println(iface.IsNil(nil))
}
Output:

true

Types

This section is empty.

Jump to

Keyboard shortcuts

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