英文: Defining a function that returns a slice of variable size in golang 问题 我想要构建一个可以返回任意大小切片的函数。我知道可...
Golang的append内存分配 VS. STL的push_back内存分配
英文: Golang append memory allocation VS. STL push_back memory allocation 问题 我比较了Go语言的append函数和STL的vec...
PHP与Golang的HTTP调用会得到不同的结果
英文: PHP vs Golang http calls gets different results 问题 我正在尝试在Google App Engine Go中实现以下PHP代码: <?ph...
接受在Golang中使用Cassandra的Set数据类型。
英文: Accepting Cassandra's Set datatype in golang 问题 我在Cassandra中有一个列,类型为set。我想使用gocql在Golang代码中接...
为什么Go函数的定义方式不同?
英文: Why a go function is defined differently? 问题 我正在尝试学习Go语言。当我以为我理解了函数是什么,如何使用它,并且想要了解接口时,我卡在了这个问题上...
你可以使用正则表达式来提取这个子字符串。
英文: How can I extract this substring with a regexp? 问题 我想提取在“cache”之后的数字(可以是任何非负整数),但不包括在“total_cach...
通过反射来检查分配给interface{}变量的函数的签名。
英文: Examining the signature of function assigned to an interface{} variable using reflection 问题 我正在尝...
获取数字之前的字符。
英文: strings - get characters before a digit 问题 我有一些字符串,如E2 9NZ,N29DZ,EW29DZ。我需要提取第一个数字之前的字符,给出上面的例子:...
Can (the underlying array of) a slice with large starting index in Go be allocated memory-efficiently?
英文: Can (the underlying array of) a slice with large starting index in Go be allocated memory-effici...
如何与子进程通信
英文: How to: Communicate with a subprocess 问题 我有一个启动C/Lua进程的Go程序。现在我想在这两者之间进行通信。例如,在子进程(C/Lua进程)运行的中间...
2905