mgo

Outdated comment for bson.NewObjectId

Bug #1253920 reported by Dmitry Chestnykh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mgo
Fix Released
Undecided
Unassigned

Bug Description

This doc-comment is no longer true, since readMachineId is called when initializing module:

// This function causes a runtime error if it fails to get the hostname
// of the current machine.

http://bazaar.launchpad.net/~niemeyer/mgo/v2/view/head:/bson/bson.go#L218

Also, in another comment readMachineId is called initMachineId:

// initMachineId generates machine id and puts it into the machineId global
// variable. If this function fails to get the hostname, it will cause
// a runtime error.
func readMachineId() []byte {

http://bazaar.launchpad.net/~niemeyer/mgo/v2/view/head:/bson/bson.go#L197

Revision history for this message
Dmitry Chestnykh (dmitry-codingrobots) wrote :

Another, unrelated, mistake in comment:
http://bazaar.launchpad.net/+branch/mgo/v2/view/head:/gridfs.go#L378

(Stray "It is a runtime")

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

All fixes adopted. Thanks Dmitry.

Changed in mgo:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.