Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 305 Bytes

readme.md

File metadata and controls

22 lines (14 loc) · 305 Bytes

conv

conv 实现了一些类型转换函数

Usage

string - bytes

import "github.com/TencentBlueKing/gopkg/conv"

conv.StringToBytes("hello world")
conv.BytesToString([]byte("hello world"))
conv.ToString(123)

conv.ToInt64("123")

var i interface{}
i = []int{123}
conv.ToSlice(i)