package post

import (
	"regexp"
	"strings"
)

func fmtKey(in string) string {
	in = strings.ToLower(in)
	in = strings.TrimSpace(in)

	re := regexp.MustCompile(`\s+`)
	in = re.ReplaceAllString(in, " ")
	in = strings.ReplaceAll(in, " ", "-")

	return in
}
