英文: Obtaining reflect.Ptr type to field in a Go struct 问题 我正在尝试将一个指向结构体字段的可变指针列表传递给第三方包。该包接受一个可变的int...
Subtracting time.Duration from time in Go
英文: Subtracting time.Duration from time in Go 问题 我有一个从time.Now()获取的time.Time值,我想得到一个正好是一个月前的时间。 我知道可...
如何在Go中编写一个作为方法的测试?
英文: How to write a test as a method in Go? 问题 我有一个以下的测试: package api_app func (api *ApiResource) Tes...
将Go中的结构体映射转换为JSON格式。
英文: Jsonify map of structs in Go 问题 现在我有一个用于客户端连接的结构体,如下所示: type ClientConn struct { uuid string web...
我应该使用Go语言编写一个跨平台的服务吗?
英文: Should I write a cross-platform service in Go? 问题 我正在研究编写一个跨平台(Windows/Debian/Darwin/Red Hat)服务,...
在Mac下使用nsf的”gothic”(Tcl/Tk Go绑定)库时遇到问题。
英文: Pb using nsf's "gothic" (tcl/tk go binding) library under Mac 问题 我已经在Linux下使用nsf的&...
Golang中的字符串和.String()存在的问题
英文: Issues with string and .String() in Golang 问题 我无法理解Go语言中的以下行为: package main import "fmt"...
Golang 反射改进
英文: Golang Reflection Improvement 问题 有没有人知道更好的方法来做这个? 目标是将自定义定义的字段从字符串转换回其整数类型。 switch val.Kind() { ...
Go language: Using package name inside package scope (for Examples)
英文: Go language: Using package name inside package scope (for Examples) 问题 我目前正在编写我的Go测试脚本中的ExampleF...
Golang不正确的JSON解组
英文: Golang improper JSON unmarshal 问题 为什么这段代码显示不正确的输出? http://play.golang.org/p/NBYnJOhmV2 英文: Why t...
364