cityuni-webserver/conf/page.go
Captain ALM d41851cfbc
Some checks are pending
ci/woodpecker/push/build Pipeline is pending
Squash and merge edge.
September Update.
2023-09-19 23:27:32 +01:00

20 lines
350 B
Go

package conf
import "strings"
type PageYaml struct {
PageName string `yaml:"pageName"`
PagePath string `yaml:"pagePath"`
}
func (py PageYaml) GetPagePath() string {
toReturn := py.PagePath
if !strings.HasSuffix(toReturn, ".go") {
toReturn += ".go"
}
if !strings.HasPrefix(toReturn, "/") {
toReturn = "/" + toReturn
}
return toReturn
}