From 1802def60fbb164a05989d09b76ae82024af778f Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Sun, 17 Nov 2019 10:41:24 +0100 Subject: Include a default startpage (WIP) --- gopherproxy.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gopherproxy.go b/gopherproxy.go index 9a081dc..a91e057 100644 --- a/gopherproxy.go +++ b/gopherproxy.go @@ -602,7 +602,10 @@ func ListenAndServe(bind, startpagefile string, robotsfile string, robotsdebug b startpagedata, err := ioutil.ReadFile(startpagefile) if err != nil { - startpagedata = []byte{} + startpagedata, err = box.Find("startpage.txt") + if err != nil { + startpagedata = []byte{} + } } startpagetext := string(startpagedata) -- cgit v1.2.3-54-g00ecf