Captain ALM
d41851cfbc
Some checks are pending
ci/woodpecker/push/build Pipeline is pending
September Update.
20 lines
350 B
Go
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
|
|
}
|