scalar

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package scalar 提供跨领域复用的基础标量转换。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int64

func Int64(v any) (int64, bool)

Int64 将常见的 JSON/Go 数值及十进制整数字符串转换为 int64。 浮点数沿用现有数据层的截断行为;超出 int64 可表达范围的值返回 false。

func String

func String(v any) string

String 将可选值转换为字符串;nil 保持为空字符串。

浮点数的展示格式沿用 fmt.Sprint。CLI 若需要兼容旧输出中的浮点截断, 应在 CLI 自己的 wrapper 中处理,不在共享包中引入展示语义。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL