Skip to content
Simple helpers to deal with nil values in go
Go
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
example
.gitignore
.travis.yml
LICENSE
README.md
nil.go
nil_test.go

README.md

nil

Simple helpers to deal with nil values in go

Build Status

Example

package main

import (
    "fmt"
    "github.com/metakeule/nil"
)

func main() {
    var x interface{}
    fmt.Println("is nil ", nil.Is(x))
    nil.MustNot(x) // panics
}

or

package main

import (
    "fmt"
    . "github.com/metakeule/nil"
)

func main() {
    var x interface{}
    fmt.Println("is nil ", IsNil(x))
    Nø(x) // panics
}

Documentation

see http://godoc.org/github.com/metakeule/nil

Something went wrong with that request. Please try again.