func convertFilePaths()

in cmd/release/pull_request/pr_input.go [54:69]


func convertFilePaths(filesPaths []string) (string, error) {
	if len(filesPaths) == 0 {
		return "", errors.New("no file paths provided")
	}

	filePathsAsString := ""
	for _, filepath := range filesPaths {
		trimmedFilePath := strings.TrimSpace(filepath)
		if len(trimmedFilePath) == 0 {
			return "", errors.New("encountered an empty file path")
		}
		filePathsAsString = filePathsAsString + trimmedFilePath + filePathDelimiter
	}

	return strings.TrimSuffix(filePathsAsString, filePathDelimiter), nil
}