From 6c9e0c274d81b9b2256acf35a55fca0d3213b0d6 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Sun, 15 Nov 2020 11:33:24 -0500 Subject: Add a few additional parmaeters. Clean up the import path. --- cmd/server/main.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'cmd/server/main.go') diff --git a/cmd/server/main.go b/cmd/server/main.go index f034cfa..c900234 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -8,9 +8,8 @@ import ( "os" "time" - siteHttp "git.riedstra.dev/mitch/go-website/http" - // "git.riedstra.dev/mitch/go-website/local" - // "git.riedstra.dev/mitch/go-website/page" + siteHttp "riedstra.dev/mitch/go-website/http" + "riedstra.dev/mitch/go-website/local" ) var VersionString = "" @@ -25,6 +24,9 @@ func main() { listen := fl.String("l", "0.0.0.0:8001", "Listening address") directory := fl.String("d", ".", "Directory to serve.") version := fl.Bool("v", false, "Print the version then exit") + fl.StringVar(&local.TimeFormat, "T", local.TimeFormat, "Print the version then exit") + fl.StringVar(&siteHttp.ReindexRedirectTo, "r", + siteHttp.ReindexRedirectTo, "Page to redirect to after reindex") _ = fl.Parse(os.Args[1:]) if *version { @@ -35,11 +37,6 @@ func main() { log.Fatal(err) } - // We're going to utilize the local version of the website - // siteHttp.NewPage = func(u string) page.Page { - // return &local.Page{Path: u} - // } - srv := &http.Server{ Handler: siteHttp.GetHandler(), Addr: *listen, -- cgit v1.2.3