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

Predict video virality before you publish.

Virality Predictor

Powerful Motion Control AI Video Generator

Motion Control AI

PlusGO 是面向中国大陆用户的 ChatGPT Plus 代充值服务平台。使用官方 CDKey,支持支付宝和微信扫码支付,平均 2 分钟完成 Plus 开通,自 2025 年起已为超过 10,000 名用户完成充值。

www.toolcenter.ai favicon
Weekly Pick

Discover the Best AI & Productivity Tools — 1,500+ tools with honest reviews.

ToolCenter
huntereyes.net favicon
Weekly Pick

AI Eye Area Evaluation

Hunter Eyes
www.payforchat.com favicon
Weekly Pick

Subscribe to ChatGPT Plus/Pro in 1 minute — no international credit card needed.

PayForChat
happyhorseai.ai favicon
Weekly Pick

Happy Horse AI Creates Videos with Motion and Storytelling

Happy Horse
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