Godeps/_workspace/src/gopkg.in/mgo.v2/session.go
func (s *Session) DatabaseNames() (names []string, err error) {
	var result dbNames
	err = s.Run("listDatabases", &result)
	if err != nil {
		return nil, err
	}
	for _, db := range result.Databases {
		if !db.Empty {
			names = append(names, db.Name)
		}
	}
	sort.Strings(names)
	return names, nil
}
func (s *Session) DatabaseNames() (names []string, err error) {
	var result dbNames
	err = s.Run("listDatabases", &result)
	if err != nil {
		return nil, err
	}
	for _, db := range result.Databases {
		if !db.Empty {
			names = append(names, db.Name)
		}
	}
	sort.Strings(names)
	return names, nil
}
func ( s * Session ) DatabaseNames ( ) ( names [ ] string , err error ) { var result dbNames err = s . Run ( " " , & result ) if err != nil { return nil , err } for _ , db := range result . Databases { if ! db . Empty { names = append ( names , db . Name ) } } sort . Strings ( names ) return names , nil }
// DatabaseNames returns the names of non-empty databases present in the cluster.
DatabaseNames returns the names of non - empty databases present in the cluster .