// GetServiceGroupById get service group by id
GetServiceGroupById get service group by id
// GetServiceGroupById get service group by id
func (sgmr *ServiceGroupMongoRepository) GetServiceGroupById(serviceGroup string) (ServiceGroup, error) {
	var sg ServiceGroup
	var err error
	if bson.IsObjectIdHex(serviceGroup) {
		err = sgmr.Collection.FindId(bson.ObjectIdHex(serviceGroup)).One(&sg)
	} else {
		err = sgmr.Collection.Find(bson.M{"name": serviceGroup}).One(&sg)
	}
	return sg, err
}
func ( sgmr * ServiceGroupMongoRepository ) GetServiceGroupById ( serviceGroup string ) ( ServiceGroup , error ) { var sg ServiceGroup var err error if bson . IsObjectIdHex ( serviceGroup ) { err = sgmr . Collection . FindId ( bson . ObjectIdHex ( serviceGroup ) ) . One ( & sg ) } else { err = sgmr . Collection . Find ( bson . M { " " : serviceGroup } ) . One ( & sg ) } return sg , err }
GetServiceGroupById get service group by id
GetServiceGroupById get service group by id