[ 原始碼: golang-fortio-safecast ]
套件:golang-fortio-safecast-dev(1.2.0-2)
golang-fortio-safecast-dev 的相關連結
Debian 的資源:
下載原始碼套件 golang-fortio-safecast:
- [golang-fortio-safecast_1.2.0-2.dsc]
- [golang-fortio-safecast_1.2.0.orig.tar.gz]
- [golang-fortio-safecast_1.2.0-2.debian.tar.xz]
維護小組:
外部的資源:
- 主頁 [github.com]
相似套件:
試製(Experimental)套件
警告:這個套件來自於 experimental 發行版。這表示它很有可能表現出不穩定或者出現 bug ,甚至是導致資料損失。請務必在使用之前查閱 changelog 以及其他潛在的文件。
Go library for number type conversions safe from accidental overflow
Avoid accidental overflow of numbers during go type conversions (e.g instead of shorter := bigger.(int8) type conversions use shorter := safecast.MustConvert[int8](bigger).
Safecast allows one to safely convert between numeric types in Go and return errors (or panic when using the Must* variants) when the cast would result in a loss of precision, range or sign.