feat: import services and standardize Go 1.26.5
This commit is contained in:
17
apps/base/cms/internal/logic/pages/ext.go
Normal file
17
apps/base/cms/internal/logic/pages/ext.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package pages
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user