英文: Find mgo document if array contains matching value 问题 我在我的API中有以下函数,用于检查用户是否拥有相关文档: type User st...
将”reflect”转化为可比较的数据。
英文: turn reflect into comparable data 问题 我想要使用reflect来比较对象的类型。以下是我的代码: package main import ( "fm...
获取当前正在执行的测试测试的名称?
英文: 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语言...
11727

