英文: Function in same package undefined 问题 我的项目结构如下。 packagetest/ main.go lib.go 在 main.go 中,我有以下代码。 ...
如何向gzip写入器添加缓冲区?
英文: How should I add buffering to a gzip writer? 问题 我注意到gzip包在读取gzip文件时内部使用了bufio,但在写入gzip文件时没有使用它。我...
In Go templates, I can get Parse to work but cannot get ParseFiles to work in like manner. Why?
英文: In Go templates, I can get Parse to work but cannot get ParseFiles to work in like manner. Why? ...
如何在模板中处理字符串格式化。
英文: How to approach string formatting in templates 问题 我将一个结构体传递给模板,有时其中的字符串长度超过了显示的限制。在其他语言中,我通常会在模板...
Go语言中的文件命名约定是什么?
英文: What are conventions for filenames in Go? 问题 我可以找到关于Go语言包命名的约定:单词之间不使用下划线,全部小写。 这个约定是否也适用于文件名? 你...
获取实现接口或继承结构的结构体的名称。
英文: Get names of structs that implement an interface or inherit a struct 问题 使用反射,可以获取表示实现某个接口或继承自特定结...
编译正则表达式时出现恐慌
英文: Panic when compiling a regular expression 问题 我正在为密码验证编写一个正则表达式,代码如下: func IsPasswordValid(value ...
LiteIDE无法构建插件。
英文: LiteIDE cannot build a plugin 问题 我正在尝试导入"github.com/couchbaselabs/go-couchbase",但是Lite...
基于nanomsg的内部服务器
英文: Internal server based on nanomsg 问题 我最近正在学习使用Golang绑定的nanomsg和zeromq。我已经测试了Req-Rep,它可以工作,但是在处理高并...
使用元编程在Go语言中解析网络协议
英文: Parsing network protocols using meta-programming in Go 问题 在JavaScript(Node)中,我编写了一个模块,它接受字段及其类型的...
364