英文: entering custom type values in a config.json file 问题 我正在尝试使用用Go编写的这个论坛软件,它有一个配置文件,需要在main.go中看到的...
解析一个没有固定键集的字符串,用于MongoDB的查找查询。
英文: Parse a string without fixed set of keys for MongoDB find query 问题 我有一个API,用户将传递他们想要传递给MongoDB的查...
Golang模板上的函数调用在单个结构体上失败了。
英文: Golang function call on template fails on a single struct 问题 我有以下代码: func (w *Warehouse) GetId()...
为什么错误不匹配nil?Go
英文: why errors don't match nil ? Go 问题 为什么当你使用负比较将错误与nil进行比较时,会得到预期的输出,但是当你尝试使用'正'运算符进行比较时,它却'不起...
Go:读写压缩的gob到文件中
英文: Go: Reading and writing compressed gob to file 问题 这似乎无法正常工作,我不确定我做错了什么。我试图将一个map转换为gob,将二进制数据压缩并...
数据库连接最佳实践
英文: Database connection best practice 问题 我有一个使用net/http的应用程序。我在http中注册了一些处理程序,这些处理程序在我们可以继续编写响应并完成请求...
Golang:自定义模板函数 “capture”
英文: Golang: custom template function "capture" 问题 我想编写一个类似于Smarty的capture的模板函数。我该如何捕获{{cap...
处理错误的正确Go方式是什么?
英文: Whats the correct Go way to do handle errors 问题 这似乎有点愚蠢,肯定有更好的方法吧? err = SendMessageAndWait(db, ...
分布式Go的框架(类似于Erlang OTP)有哪些?
英文: Frameworks for distributed Go (like Erlang OTP)? 问题 似乎Go语言正在受到关注,并且有很多有趣的项目在使用它。 但是,我经常听到一个观点,即G...
将不变的小写标题添加到 Golang 的 HTTP 请求中。
英文: Add unaltered lowercase headers to golang http request 问题 我正在尝试在一个golang程序中设置全部小写的标头,但是Canonical...
364