Beispiel #1
0
// Helper function that verifies there has been a change in the files for the system tests lynk.
// @returns True if there has been a change, False if there has not been a change
func checkChanges() bool {
	changed := len(lynxutil.GetLynk(client.GetLynks(), "SysTests").Files)
	result := false
	if changed != original {
		original = changed
		result = true
	}

	return result
}
Beispiel #2
0
// FilePopulate - Function which populates a lynk with their files and filesizes so we
// display them.
// @param pathToTable - the lynk whose files we want to populate
// @returns - a string containing all the file entries
func FilePopulate(index int) string {
	client.PopulateFilesAndSize()
	lynks := client.GetLynks()
	fileEntries := ""
	tempLynk := lynks[index]
	//fmt.Println(tempLynk.Name)
	fileNames := tempLynk.FileNames
	fileSizes := tempLynk.FileSize
	i := 0
	for i < len(fileNames) {
		fileEntries += "<tr> \n"
		fileEntries += "<td>" + fileNames[i] + "</td>\n"
		fileEntries += "<td>" + strconv.Itoa(fileSizes[i]) + "</td>\n"
		fileEntries += "</tr>\n"
		i++
	}

	return fileEntries
}