func findHighestSuffix(files ...string) int {
	var suffix = 1

	for {
		var found = false
		for _, file := range files {
			p := fmt.Sprintf("%s.%03d", file, suffix)
			_, err1 := fs.Stat(p)
			if err1 == nil {
				found = true
				break
			}
		}

		if !found {
			return suffix
		}

		suffix++
	}
}
// FindHighestSuffix returns the highest suffix found on the files. It checks first .001, then .002 etc until it finds
// a suffix that doesn't exist on all files.
FindHighestSuffix returns the highest suffix found on the files. It checks first .001, then .002 etc until it finds
a suffix that doesn't exist on all files.
// FindHighestSuffix returns the highest suffix found on the files . It checks first . 001 then . 002 etc until it finds // a suffix that doesn ' t exist on all files .
func findHighestSuffix(files ...string) int {
	var suffix = 1
	for {
		var found = false
		for _, file := range files {
			p := fmt.Sprintf("%s.%03d", file, suffix)
			_, err1 := fs.Stat(p)
			if err1 == nil {
				found = true
				break
			}
		}
		if !found {
			return suffix
		}
		suffix++
	}
}
func findHighestSuffix ( files ... string ) int { var suffix = 1 for { var found = false for _ , file := range files { p := fmt . Sprintf ( " " , file , suffix ) _ , err1 := fs . Stat ( p ) if err1 == nil { found = true break } } if ! found { return suffix } suffix ++ } }
FindHighestSuffix returns the highest suffix found on the files.
FindHighestSuffix returns the highest suffix found on the files .