package main import ( "flag" "log" "git.feuerfuchs.dev/Feuerfuchs/gopherproxy" ) var ( // TODO: Allow config file and environment vars // (opt -> env -> config -> default) bind = flag.String("bind", "0.0.0.0:8000", "[int]:port to bind to") robotsfile = flag.String("robots-file", "robots.txt", "robots.txt file") robotsdebug = flag.Bool("robots-debug", false, "print output about ignored robots.txt") uri = flag.String("uri", "gopher/floodgap.com", "/:[port] to proxy to") vipsconcurrency = flag.Int("vips-concurrency", 1, "Concurrency level of libvips") ) func main() { flag.Parse() // Use a config struct log.Fatal(gopherproxy.ListenAndServe(*bind, *robotsfile, *robotsdebug, *vipsconcurrency, *uri)) }