// GenerateFilePathAdjacentToFile creates a filename based on the sourceFilePath, first by
// removing the extension and then adding the given suffix. The full path is returned.
GenerateFilePathAdjacentToFile creates a filename based on the sourceFilePath, first by
removing the extension and then adding the given suffix. The full path is returned.
// GenerateFilePathAdjacentToFile creates a filename based on the sourceFilePath first by // removing the extension and then adding the given suffix . The full path is returned .
func GenerateFilePathAdjacentToFile(sourceFilePath string, suffix string, forceOverwrite bool) string {
	destFilePath := strings.TrimSuffix(sourceFilePath, filepath.Ext(sourceFilePath)) + suffix
	if _, err := os.Stat(destFilePath); err != nil {
		if !os.IsNotExist(err) {
			logrus.Fatal(err)
		}
	} else if !forceOverwrite {
		logrus.Fatalf("file already exists: %v - aborting", destFilePath)
	}
	return destFilePath
}
func GenerateFilePathAdjacentToFile ( sourceFilePath string , suffix string , forceOverwrite bool ) string { destFilePath := strings . TrimSuffix ( sourceFilePath , filepath . Ext ( sourceFilePath ) ) + suffix if _ , err := os . Stat ( destFilePath ) ; err != nil { if ! os . IsNotExist ( err ) { logrus . Fatal ( err ) } } else if ! forceOverwrite { logrus . Fatalf ( " " , destFilePath ) } return destFilePath }
GenerateFilePathAdjacentToFile creates a filename based on the sourceFilePath, first by
removing the extension and then adding the given suffix.
GenerateFilePathAdjacentToFile creates a filename based on the sourceFilePath first by removing the extension and then adding the given suffix .