Skip to content

alexsteele/deref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

deref

Provides convenience functions to extract the value from a pointer, returning the appropriate zero value if the pointer is nil.

Example:

package main

import (
        "fmt"

        "github.com/AlexSteele/deref"
)

func main() {
        var i *int
        fmt.Println(deref.Int(i)) // Prints '0'
}

About

pointers -> builtin types with no nil-checking

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages