英文: Golang: Stack multiple method calls on one line 问题 开始使用Go语言。 我正在尝试编写一个函数,将名字的第一个字母大写,然后将姓氏全部大写。 ...
为什么Go编译器说一个结构体不满足接口,而实际上它是满足的?
英文: Why is the go compiler saying a struct does not satisfy an interface when it does? 问题 我可以看到在scan...
Go中的不可变字符串
英文: Immutable strings in Go 问题 有人能解释一下为什么在函数changeMe()中修改后,&c1.name的地址仍然相同吗?我以为在Go语言中字符串是不可变的。 p...
MGO TTL索引的创建以选择性删除文档。
英文: MGO TTL indexes creation to selectively delete documents 问题 我正在使用Golang和MongoDB进行工作。我有一个集合,需要保留一...
Go:比较匿名结构体
英文: Go: comparing anonymous structs 问题 我不理解go如何比较匿名结构体。我正在尝试理解这段代码: package main import ( "fmt...
在根项目文件夹中运行Go测试。
英文: Running go tests from root project folder 问题 我必须接手一个Go项目,但我以前从未接触过Go,并且该项目没有测试。所以我开始添加测试,但是我无法运行...
How to log messages to the console and a file both in golang?
英文: How to log messages to the console and a file both in golang? 问题 我可以将所有消息定向到log.txt文件中: logFile,...
Golang选择性将字符串转换为小写。
英文: golang selective conversion of string to lower case 问题 我正在使用一个ldap对象,从Active Directory中检索一些条目。结果...
Correct way to read file in Go AppEngine
英文: Correct way to read file in Go AppEngine 问题 在使用Google AppEngine(Go)时,正确的读取文件的方法是什么? 在Java中,我知道可以...
可以将golang的db.Query()输出转储为字符串吗?
英文: Is it possible to dump golang db.Query() output to a string? 问题 我有一个小的Heroku应用程序,在查询执行后,我从每一行打印出...
2905


