Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 417 Bytes

README.md

File metadata and controls

26 lines (22 loc) · 417 Bytes

convert

golang convert type utils | golang类型转换工具

init package

go get github.com/dmskys/convert

How To Use

import (
    "github.com/dmskys/convert"
)
func main(){
	convert.ToStr(1)
	convert.BinToDec([]byte{1, 2})
	convert.DecToBin(1)
	convert.StrToInt("1")
	convert.StrToInt8("2")
	convert.Float32ToStr(1.234, 2)
	convert.Float64ToStr(1.3445, 3)
	convert.AddSingleQuotes(1)
}