Popularity
0.8
Growing
Activity
0.0
Declining
3
1
2

Programming language: Go
License: BSD 3-clause "New" or "Revised" License
Tags: Miscellaneous     Types     Conversion    
Latest version: v1.23.0

go-types alternatives and similar packages

Based on the "Miscellaneous" category.
Alternatively, view go-types alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of go-types or a related project?

Add another 'Miscellaneous' Package

README

go-types

Golang library for safe interface{} to base types convertion.

Install

go get gopkg.in/night-codes/types.v1

Documentation

Docs on godoc.org

How to use

package main

import (
    "gopkg.in/night-codes/types.v1"
    "fmt"
    "reflect"
)

func main() {
    a, b, c := "8", 1, 1.04
    a2, b2, c2 := types.Rune(a), types.Float64(b), types.String(c)

    fmt.Println(a2, b2, c2)
    fmt.Println(reflect.TypeOf(a2), reflect.TypeOf(b2), reflect.TypeOf(c2))
}

// out :
// 8 1 1.04
// int32 float64 string

License

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004

Copyright (C) 2015 Oleksiy Chechel [email protected]

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  1. You just DO WHAT THE FUCK YOU WANT TO.


*Note that all licence references and agreements mentioned in the go-types README section above are relevant to that project's source code only.