19 lines
258 B
Go
19 lines
258 B
Go
|
package server
|
||
|
|
||
|
import (
|
||
|
`fmt`
|
||
|
`strings`
|
||
|
)
|
||
|
|
||
|
func getTitle(subPage string) (title string) {
|
||
|
|
||
|
if subPage == "" || subPage == "index" {
|
||
|
title = baseTitle
|
||
|
return
|
||
|
}
|
||
|
|
||
|
title = fmt.Sprintf("%s%s%s", baseTitle, titleSep, strings.ToTitle(subPage))
|
||
|
|
||
|
return
|
||
|
}
|