aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorFeuerfuchs <git@feuerfuchs.dev>2020-05-18 12:12:43 +0200
committerFeuerfuchs <git@feuerfuchs.dev>2020-05-18 12:12:43 +0200
commit4bf44b16562335b3d09b6df0150521bb5b5f776f (patch)
tree576723e6dc9f9db48d0892f7ec354a11b973aef4 /main.go
parentAdded 2 more glyphs (diff)
downloadgopherproxy-4bf44b16562335b3d09b6df0150521bb5b5f776f.tar.gz
gopherproxy-4bf44b16562335b3d09b6df0150521bb5b5f776f.tar.bz2
gopherproxy-4bf44b16562335b3d09b6df0150521bb5b5f776f.zip
WIP: Refactoring
Diffstat (limited to 'main.go')
-rw-r--r--main.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/main.go b/main.go
deleted file mode 100644
index f5a82fe..0000000
--- a/main.go
+++ /dev/null
@@ -1,25 +0,0 @@
1package main
2
3import (
4 "flag"
5 "log"
6
7 "git.feuerfuchs.dev/Feuerfuchs/gopherproxy/gopherproxy"
8)
9
10var (
11 // TODO: Allow config file and environment vars
12 // (opt -> env -> config -> default)
13 bind = flag.String("bind", "0.0.0.0:8000", "[int]:port to bind to")
14 startpagefile = flag.String("startpage-file", "startpage.txt", "Default page to display if no URL is specified")
15 robotsfile = flag.String("robots-file", "robots.txt", "robots.txt file")
16 robotsdebug = flag.Bool("robots-debug", false, "print output about ignored robots.txt")
17 vipsconcurrency = flag.Int("vips-concurrency", 1, "Concurrency level of libvips")
18)
19
20func main() {
21 flag.Parse()
22
23 // Use a config struct
24 log.Fatal(gopherproxy.ListenAndServe(*bind, *startpagefile, *robotsfile, *robotsdebug, *vipsconcurrency))
25}