英文: idiomatic way of organizing my code 问题 我感觉这个问题有点模糊,涉及到待关闭的问题、模糊的问题、意见等等,但还是来回答一下吧。 如何组织我的Go代码库? ...
Go中的惯用变量大小的工作池
英文: Idiomatic variable-size worker pool in Go 问题 我正在尝试在Go中实现一个工作池。go-wiki(以及Channels部分的Effective Go)...
可以在`map[string]interface{}`上定义一个函数吗?
英文: can I define a function on a map[string]interface{} 问题 我已经尝试了以下两种方式: func (m map[string]interfac...
How can I tell if a file with this name exists?
英文: How can I tell if a file with this name exists? 问题 在写入GCS文件之前,我想测试一下文件是否存在。然而,我从file.Stat中得到了一个错...
使用Golang进行HTTP PATCH语义的REST更新请求
英文: golang - Rest update request using http patch semantics 问题 type A struct { Id int64 Email sql.Nu...
劫持客户端连接
英文: Go hijack client connection 问题 Go语言的HTTP连接劫持。 我知道如何在服务器端进行劫持。 http://golang.org/pkg/net/http/#ex...
Structure for your go workspace when using private git repository
英文: Structure for your go workspace when using private git repository 问题 我一直在努力弄清楚在不使用GitHub时,Go代码/工...
Go – Idiomatic way around interface slice issue
英文: Go - Idiomatic way around interface slice issue 问题 我有一个包含有关某人工作时间的 WorkDay 结构体,一个用于保存一组 WorkDay ...
How do you pass multiple objects to go template?
英文: How do you pass multiple objects to go template? 问题 大多数我能找到的示例都描述了非常简单/基本的事情,比如显示一个人对象的属性,像这样: 名...
如何解析JSON?
英文: How do I Unmarshal JSON? 问题 我正在尝试将JSON解组成一个结构体。然而,该结构体有一个带有标签的字段。使用反射,我试图查看标签中是否包含字符串"json&...
11727