// RegisterServiceGroupHandler handle POST /service-groups

RegisterServiceGroupHandler handle POST /service-groups
// RegisterServiceGroupHandler handle POST / service - groups
func RegisterServiceGroupHandler(c *routing.Context) error {
	serviceGroup, err := servicediscovery.ValidateServiceGroupBody(c)
	if err != nil {
		return http.Error(c, strconv.Quote(err.Error()), 400, ServiceDiscoveryServiceName())
	}
	serviceGroupService, _ := getServiceGroupsService(c)
	err = serviceGroupService.CreateServiceGroup(serviceGroup)
	if err != nil {
		return http.Error(c, strconv.Quote(err.Error()), 400, ServiceDiscoveryServiceName())
	}
	return http.Created(c, "Service created successfuly", ServiceDiscoveryServiceName())
}
func RegisterServiceGroupHandler ( c * routing . Context ) error { serviceGroup , err := servicediscovery . ValidateServiceGroupBody ( c ) if err != nil { return http . Error ( c , strconv . Quote ( err . Error ( ) ) , 400 , ServiceDiscoveryServiceName ( ) ) } serviceGroupService , _ := getServiceGroupsService ( c ) err = serviceGroupService . CreateServiceGroup ( serviceGroup ) if err != nil { return http . Error ( c , strconv . Quote ( err . Error ( ) ) , 400 , ServiceDiscoveryServiceName ( ) ) } return http . Created ( c , " " , ServiceDiscoveryServiceName ( ) ) }
RegisterServiceGroupHandler handle POST /service-groups
RegisterServiceGroupHandler handle POST / service - groups
// Validate post body
 // get service group service
 // Create service group
