remove unnecessary function

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
development
kim (grufwub) 4 years ago
parent 47aeb49681
commit 5248e27528

@ -5,8 +5,9 @@ import (
"gophi/core"
)
// setup parses gopher specific flags, and all core flags, preparing server for .Run()
func setup() {
// Run does as says :)
func Run() {
// Parse gopher specific flags, then all
pWidth := flag.Uint(pageWidthFlagStr, 80, pageWidthDescStr)
footerText := flag.String(footerTextFlagStr, "Gophi, a Gopher server in Go!", footerTextDescStr)
subgopherSizeMax := flag.Float64(subgopherSizeMaxFlagStr, 1.0, subgopherSizeMaxDescStr)
@ -27,16 +28,12 @@ func setup() {
core.SystemLog.Infof("Policy file %s not found! Generating...", p.Absolute())
core.FileSystem.AddGeneratedFile(p, generateCapsTxt(*desc, *admin, *geo))
}
p = core.NewPath(core.Root, "robots.txt")
if _, err := core.FileSystem.StatFile(p); err != nil {
core.SystemLog.Infof("Policy file %s not found! Generating...", p.Absolute())
core.FileSystem.AddGeneratedFile(p, generateRobotsTxt())
}
}
// Run does as says :)
func Run() {
setup()
// Start!
core.Start(serve)
}

Loading…
Cancel
Save