4efa383c57
We don't want to directly write to models so that only selected fields can be changed and values can be validated for security reasons. Signed-off-by: Michael Mayer <michael@liquidbytes.net>
12 lines
189 B
Go
12 lines
189 B
Go
package txt
|
|
|
|
import "strings"
|
|
|
|
// SlugToTitle converts a slug back to a title
|
|
func SlugToTitle(s string) string {
|
|
if s == "" {
|
|
return ""
|
|
}
|
|
|
|
return Title(strings.Join(Words(s), " "))
|
|
}
|