MCPcopy
hub / github.com/writefreely/writefreely / initGopher

Function initGopher

gopher.go:25–31  ·  view source on GitHub ↗
(apper Apper)

Source from the content-addressed store, hash-verified

23)
24
25func initGopher(apper Apper) {
26 handler := NewWFHandler(apper)
27
28 gopher.HandleFunc("/", handler.Gopher(handleGopher))
29 log.Info("Serving on gopher://localhost:%d", apper.App().Config().Server.GopherPort)
30 gopher.ListenAndServe(fmt.Sprintf(":%d", apper.App().Config().Server.GopherPort), nil)
31}
32
33// Utility function to strip the URL from the hostname provided by app.cfg.App.Host
34func stripHostProtocol(app *App) string {

Callers 1

ServeFunction · 0.85

Calls 4

NewWFHandlerFunction · 0.85
GopherMethod · 0.80
ConfigMethod · 0.65
AppMethod · 0.65

Tested by

no test coverage detected