Skip to main content

CurateClick

github.com favicon

cvt

cvt是一个简单、安全、高效的Go语言工具包,用于任意数据类型的安全转换。支持自定义类型、指针类型、默认值设置,并提供丰富的API覆盖基本数据类型转换。具有99%的测试覆盖率,确保稳定可靠。

Check out cvt on CurateClick

• Copy the embed code to showcase this product on your website

• Share on X to spread the word about this amazing tool

cvt一个简单、安全、高效的转换任意数据类型的 Go 语言工具包,支持自定义类型、提取结构体字段和值GitHub: 安装## 使用### 支持 > 以 结尾的方法 : 当转换失败时会返回错误### 自定义类型、指针类型> 自动解引用,并找到基本类型,完全支持自定义类型的转换### 忽略 > 名称不以 结尾的方法,如果转换失败,不会返回错误,会返回零值### 默认值> 如果转换失败,返回默认值### 更多示例> 超过1000个单元测试用例,覆盖率99%,所有示例可通过单元测试了解:## API### bool- Bool / BoolE### int- Int / IntE- Int8 / Int8E- Int16 / Int16E- Int32 / Int32E- Int64 / Int64E- Uint / UintE- Uint8 / Uint8E- Uint16 / Uint16E- Uint32 / Uint32E- Uint64 / Uint64E### string- String / StringE### float- Float32 / Float32E- Float64 / Float64E### time- Time / TimeE### slice- : 类似于 PHP 中的 , 函数的切片版本,返回 - : 取 或 的字段值,返回 - : 取 的键名,返回 - / : 转换成 - : 转换成 - : 转换成 - : 转换成 - : 转换成

Latest Weekly Picks

promptbuilder.cc favicon
Weekly Pick

Generate, optimize, test, and manage AI prompts in one place. Turn an idea into a ready-to-use prompt in seconds.

Prompt Builder
freqz.net favicon
Weekly Pick

Your Personal K-Style Vibe Photo Studio

Freqz
webleadr.com favicon
Weekly Pick

Find and contact web design leads and businesses without websites, like local dentists, effortlessly from any location in just a few clicks.

Webleadr

the art of having something to say

pretty-scale.com favicon
Weekly Pick

How Pretty Are You? Let AI Decide.

Pretty Scale
c2story.com favicon
Weekly Pick

Create Illustrated Stories with AI

C2story

Impromptu Speech Topics & Timer

Seedance 2.0: Multimodal AI video creator. Precisely direct characters and cameras to create production-ready, multi-shot cinematic stories in one click.