README ¶ 运行示例代码 示例代码是直接连接,因为的mongo示例开启了权限验证,所以又加了读取连接配置文件的代码。 推荐还是使用DialWithInfo方法来连接,而不是直接用带用户名和密码的url连接。 运行结果 参考资料 http://labix.org/mgo https://objectrocket.com/docs/mongodb_go_examples.html#connecting Expand ▾ Collapse ▴ Documentation ¶ There is no documentation for this package. Source Files ¶ View all Source files main.go Click to show internal directories. Click to hide internal directories.