英文: Get the name of the currently executing testing test? 问题 在Go语言中,如何获取当前正在执行的测试的名称,即以Test开头的函数名称,而...
How do I create a variable in go only if a condition is true?
英文: How do I create a variable in go only if a condition is true? 问题 如果我在if块内创建一个变量,我就不能在后面使用它。如果我在i...
如何使用反射在Go语言中设置一个指向字符串的结构成员呢?
英文: How to set a struct member that is a pointer to a string using reflection in Go 问题 我正在尝试使用反射来设置一...
将JSON对象数组转换为YAML格式。
英文: Converting JSON object array to YAML 问题 我有以下需要转换为YAML格式的JSON: { "siteidparam": "lid&...
读取 CSV 字符串并将其转换为自定义对象列表 Go 语言
英文: Read CSV String Into List of Custom Objects Go Language 问题 我正在尝试从CSV文件中读取一串数据,并将数据解析为自定义对象的列表。我遇...
在golang中创建一个JSON结构的接口。
英文: Creating an interface for a JSON struct in golang 问题 假设我有一个struct,我将json参数数据绑定到它上面,像这样: type Use...
如何检索 []bson.M 类型的映射?
英文: How to retrieve []bson.M type of map 问题 如何检索多维[]bson.M类型的映射? Mongo中的数据如下所示: "taskData"...
为什么Clojure的异步库不能处理Go的素数筛法?
英文: Why can't Clojure's async library handle the Go prime sieve? 问题 尝试在Clojure中使用异步库时,我将Go语言...
重写 ResponseWriter 接口以捕获 HTTP 错误。
英文: Overriding ResponseWriter interface to catch HTTP errors 问题 我正在使用Go编写一个Web应用程序,虽然各种mux库提供了设置自定义4...
如何在Golang中运行外部的Python脚本?
英文: How to run external Python script in Golang? 问题 我想运行一个外部的Python脚本,它需要4个参数。如果我想在cmd中运行Python脚本,命令...
2905


