kangkona / any

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

any.Type

GoDoc Build Status Codecov

The missing any.Type for go.

any


any.Type is just a type alias for interface{}, you can use it as any value's type.

Example:

package main

import (
    "github.com/aisk/any"
)

func main() {
    var a any.Type
    a = 42
    a = true
    a = "don't panic"
    println(a)
}

There is also an any.Map and any.Slice, behave like it looks like.

About

License:MIT License


Languages

Language:Go 100.0%