英文: Is there a method to generate a UUID with Go language? 问题 我有一段代码看起来像这样: u := make([]byte, 16) _,...
尝试使用interface{}将切片转换为选择随机元素。
英文: trying to use interface{} to a slice to select random element 问题 func RandomChoice(a []interface...
len方法未定义
英文: len method undefined 问题 我一直在阅读[golang-book]: http://www.golang-book.com,并且在阅读过程中完成了练习。在第6章中,有一个练...
运行时错误: “在空映射中赋值”
英文: Runtime error: "assignment to entry in nil map" 问题 我试图创建一个Map的切片。虽然代码编译没有问题,但我得到了以下的运行...
两个原子样式的代码在sync/atomic.once.go中是否是必需的?
英文: Is the two atomic style code in sync/atomic.once.go necessary? 问题 sync/atomic.once.go中的代码是: func...
何时使用缓冲通道?
英文: When to use a buffered channel? 问题 增加缓冲区大小的实际用例是什么? 英文: What are the uses cases for buffered cha...
Go中的通用可变参数?
英文: Generic variadic argument in Go? 问题 我知道Go语言不支持模板或重载函数,但我想知道是否有办法为可变参数函数实现某种通用编程? 我有很多类似这样的函数: fu...
为Debian打包Go应用程序
英文: Packaging Go application for Debian 问题 我如何将我的Go二进制文件放入Debian软件包中?由于Go是静态链接的,我只有一个可执行文件 - 我不需要很多复...
需要帮助理解缓冲通道。
英文: Require help in understanding buffered channels 问题 我很难理解缓冲通道的工作原理。根据以下示例,我正在尝试同时利用两个线程打印出当前时间,每两...
正确的GOPATH应该包括来自App Engine SDK的App Engine库吗?
英文: Proper GOPATH to include App Engine libraries from App Engine SDK? 问题 我正在尝试使用Go SDK为App Engine编写...
11727