开发者交流平台
开发者交流平台

通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。

bj
登录
  • 友情链接
站内
casting

casting

go

Go conversion between struct and byte array

英文: Go conversion between struct and byte array 问题 我正在使用Go编写一个客户端-服务器应用程序。我想在Go中执行类似C语言的类型转换。 例如,在Go...
huangapple 2014年10月15日148评论go struct
go

可以将chan interface{}转换为其他类型吗?

英文: Golang: Can I cast to chan interface{} 问题 我正在尝试编写一个通用的订阅包装器,类似于: type Subscriber interface { Sub...
huangapple 2014年8月31日154评论go interface
go

如何计算浮点数的小数位数?

英文: How to count decimal places of float? 问题 我想检查一个float32是否有两位小数。我在JavaScript中的做法如下: step := 0.01 v...
huangapple 2014年7月21日146评论casting go
go

Go:将map[string]interface{}转换为map[string]string时类型转换失败。

英文: Go: Cast type fails for map[string]interface{} to map[string]string 问题 我不确定为什么以下的类型转换不起作用: impor...
huangapple 2014年7月5日140评论casting go
go

golang cast a string to net.IPNet type

英文: golang cast a string to net.IPNet type 问题 我可以帮你翻译这段内容。以下是翻译结果: 我有一组以CIDR表示的字符串片段。它们既是IPv4又是IPv6的...
huangapple 2014年6月12日161评论casting go
go

无法从`[]interface{}`断言为`[]string`类型。

英文: Unable to assert type `[]string` from `[]interface{}` 问题 我正在尝试处理从mongodb (mgo)检索到的一些数据。 不幸的是,我无法...
huangapple 2014年5月10日153评论go mongodb
go

将interface{}转换为特定类型。

英文: convert interface{} to certain type 问题 我正在开发一个接收 JSON 的 Web 服务。Go 语言对类型转换要求过于严格。 所以我写了以下函数将 inte...
huangapple 2014年1月19日181评论casting go
go

Does Golang do any conversion when casting a byte slice to a string?

英文: Does Golang do any conversion when casting a byte slice to a string? 问题 Golang在将字节切片转换为字符串时是否进行任...
huangapple 2014年1月8日151评论go string
go

Golang将多个返回值转换为匹配命名结果参数。

英文: Golang casting a multiple return value to match named result parameter 问题 假设我想定义一个带有命名结果参数的函数,其中...
huangapple 2013年12月8日213评论casting go
go

How to cast to a type alias in Go?

英文: How to cast to a type alias in Go? 问题 请看**这个代码片段**。 相关代码: type somethingFuncy func(int) bool fun...
huangapple 2013年10月25日150评论go types
19

文章导航

1 … 13 14 15 16 17 18 19
name
开发者交流平台
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
文章117266 留言 4 访客17022871

热门标签

python sql typescript c++ css node.js json arrays c# html r android reactjs pandas javascript spring flutter spring-boot java go

悟已往之不谏,知来者之可追!

今日
00%
已00小时
本周
00%
已过00天
本月
00%
已过00天
今年
00%
已是00月

Copyright ©  开发者交流平台 版权所有.

闽 ICP 备 2022019110 号 - 1
  • 开发者交流平台

    本页二维码