func (updownService *UpdownMonitorService) createHttpCheck(updownMonitor models.Monitor) updown.CheckItem {

	log.Println("Updown monitor's createHttpCheck method has been called")

	// populating updownCheckItemObj object attributes using updownMonitor object
	log.Println("Populating updownCheckItemObj object attributes using updownMonitor object")
	updownCheckItemObj := updown.CheckItem{}

	log.Println("Parsing URL")
	_, err := url.Parse(updownMonitor.URL)

	if err != nil {
		log.Println("Unable to parse the URL : ", updownMonitor.URL)
		return updownCheckItemObj
	}

	updownCheckItemObj.URL = updownMonitor.URL
	updownCheckItemObj.Alias = updownMonitor.Name

	// populating updownCheckItemObj object attributes using
	log.Println("Populating updownCheckItemObj object attributes using annotations")
	updownService.addAnnotationConfigToHttpCheck(&updownCheckItemObj, updownMonitor.Annotations)

	return updownCheckItemObj
}
// createHttpCheck method it will populate updown CheckItem object using updownMonitor's attributes
// and annotations
createHttpCheck method it will populate updown CheckItem object using updownMonitor's attributes
and annotations
// createHttpCheck method it will populate updown CheckItem object using updownMonitor ' s attributes // and annotations
func (updownService *UpdownMonitorService) createHttpCheck(updownMonitor models.Monitor) updown.CheckItem {
	log.Println("Updown monitor's createHttpCheck method has been called")
	log.Println("Populating updownCheckItemObj object attributes using updownMonitor object")
	updownCheckItemObj := updown.CheckItem{}
	log.Println("Parsing URL")
	_, err := url.Parse(updownMonitor.URL)
	if err != nil {
		log.Println("Unable to parse the URL : ", updownMonitor.URL)
		return updownCheckItemObj
	}
	updownCheckItemObj.URL = updownMonitor.URL
	updownCheckItemObj.Alias = updownMonitor.Name
	log.Println("Populating updownCheckItemObj object attributes using annotations")
	updownService.addAnnotationConfigToHttpCheck(&updownCheckItemObj, updownMonitor.Annotations)
	return updownCheckItemObj
}
func ( updownService * UpdownMonitorService ) createHttpCheck ( updownMonitor models . Monitor ) updown . CheckItem { log . Println ( " " ) log . Println ( " " ) updownCheckItemObj := updown . CheckItem { } log . Println ( " " ) _ , err := url . Parse ( updownMonitor . URL ) if err != nil { log . Println ( " " , updownMonitor . URL ) return updownCheckItemObj } updownCheckItemObj . URL = updownMonitor . URL updownCheckItemObj . Alias = updownMonitor . Name log . Println ( " " ) updownService . addAnnotationConfigToHttpCheck ( & updownCheckItemObj , updownMonitor . Annotations ) return updownCheckItemObj }
createHttpCheck method it will populate updown CheckItem object using updownMonitor's attributes
and annotations
createHttpCheck method it will populate updown CheckItem object using updownMonitor ' s attributes and annotations
// populating updownCheckItemObj object attributes using updownMonitor object // populating updownCheckItemObj object attributes using