func Lines2MapString(input, delimiter string, hdr bool) (map[string]string, []string) {
	if ess.IsStrEmpty(input) || ess.IsStrEmpty(delimiter) {
		return nil, nil
	}
	result := make(map[string]string)
	errResult := make([]string, 0)
	scanner := bufio.NewScanner(strings.NewReader(input))
	for scanner.Scan() {
		line := strings.TrimSpace(scanner.Text())
		if len(line) == 0 {
			continue
		}
		parts := strings.Split(line, delimiter)
		if len(parts) != 2 {
			errResult = append(errResult, line)
			continue
		}
		result[mapKey(parts[0], hdr)] = strings.TrimSpace(parts[1])
	}
	return result, errResult
}
Lines2MapString method transforms multi-line input to map[string]string by given
delimiter.
package util
import (
	"bufio"
	"errors"
	"net/http"
	"path/filepath"
	"regexp"
	"sort"
	"strconv"
	"strings"
	"thumbai/app/models"
	"aahframe.work/essentials"
)