Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Version release version Version = "0.0.1" // Commit will be overwritten automatically by the build system Commit = "HEAD" )
Functions ¶
func FullVersion ¶ added in v0.0.3
func FullVersion() string
FullVersion display the full version and build
func GopherHandler ¶ added in v0.0.3
func GopherHandler(tpl *template.Template, robotsdata *robotstxt.RobotsData, uri string) http.HandlerFunc
GopherHandler returns a Handler that proxies requests to the specified Gopher server as denoated by the first argument to the request path and renders the content using the provided template. The optional robots parameters points to a robotstxt.RobotsData struct to test user agents against a configurable robotst.txt file.
func ListenAndServe ¶
ListenAndServe creates a listening HTTP server bound to the interface specified by bind and sets up a Gopher to HTTP proxy proxying requests as requested and by default will prozy to a Gopher server address specified by uri if no servers is specified by the request. The robots argument is a pointer to a robotstxt.RobotsData struct for testing user agents against a configurable robots.txt file.
func RobotsTxtHandler ¶ added in v0.0.3
func RobotsTxtHandler(robotstxtdata []byte) http.HandlerFunc
RobotsTxtHandler returns the contents of the robots.txt file if configured and valid.