英文: Multiple applications built from one directory 问题 我有一个简单的Go项目,其中包括一个Web应用程序、一个工作程序和一个共享文件。这些文件分别...
我的数据存储在appspot上没有索引条目。
英文: My datastore has no index entries on appspot? 问题 首先,我创建了一个 index.yaml 文件: kind: Tarifa 2014 ance...
创建列表的映射?
英文: Create Map of Lists? 问题 我有一个类似于这样的结构体,它包含一个任务ID、一个日期和一个注释字段: type Journal struct { task_id int d...
不可能的类型切换情况
英文: Impossible type switch case 问题 这个程序无法编译: package main type Validator struct { } // Error 实现了 err...
错误 vs 致命错误在测试中的区别
英文: Error vs Fatal in tests 问题 我正在使用Go-Json-Rest开发一个JSON Web服务,并编写测试代码。 ... recorded = test.RunReque...
需要清理的对象的包
英文: package with objects that need cleanup 问题 我正在尝试将我的数据库代码分组到一个子包中,这样可以封装我的数据库连接和所有的预处理语句。 我可以在包的in...
How do I create a text index in mongodb with golang and the mgo library?
英文: How do I create a text index in mongodb with golang and the mgo library? 问题 我正在尝试在一个集合上进行全文搜索,但是...
在Go程序中,有没有办法检查未处理的错误?
英文: Any way to check for un-handled errors in a Go program? 问题 考虑以下代码: package main import ( "er...
无法在Go中获取Angular/Restangular表单数据
英文: Cannot get Angular/Restangular form data in Go 问题 我有一个正常工作的Go REST服务,我可以使用Chrome REST插件获取表单数据。 我...
错误的具体类型
英文: Error concrete type 问题 我有一个方法CreateProduct(&Product) error,它返回一个实现了error接口的值。它可以是gorm数据库...
11727