Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.02 KB

README.md

File metadata and controls

39 lines (27 loc) · 1.02 KB

goic

GoDoc Build Status Coverage Status MIT License

goic is a library for converting go's interface{} to variable type.

Installation

Make sure that Go is installed on your computer. Type the following command in your terminal:

go get gopkg.in/hapoon/goic.v1

After it the package is ready to use.

Add following line in your *.go file:

import "gopkg.in/hapoon/goic.v1"

Usage

interface{} to uint

func Sample(val interface{}) {
    u,err := goic.ToUint()
    if err != nil {
        // error handling
    }
}

License

MIT License