Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func If ¶
func If(cond bool, i1, i2 interface{}) interface{}
If returns the first item if cond is true, or the second item if it is false.
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, IsNil 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.
Click to show internal directories.
Click to hide internal directories.