X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=main.go;h=00b396e4ba9c4450ed3ba3d7518c495e9b363c12;hb=051552265345ad165bd015fabc8b7c947809e708;hp=23a3accbe2046619267e52bebb7c6d653e8b5934;hpb=d497b77a18c9dee791e9dae8631ba25e3d707f01;p=uploader.git diff --git a/main.go b/main.go index 23a3acc..00b396e 100644 --- a/main.go +++ b/main.go @@ -54,11 +54,10 @@ const ( var ( Index = template.Must(template.New("index").Parse(` Upload -
 Example command line usage:
-
-    $ curl -F file=@somedata.tar.gpg [-F comment="optional comment"] http://.../upload/
-    $ b2sum -a blake2b somedata.tar.gpg # to verify checksum
+
+$ curl -F file=@somedata.tar.gpg [-F comment="optional comment"] http://.../upload/
+$ b2sum -a blake2b somedata.tar.gpg # to verify checksum
 

@@ -199,9 +198,11 @@ func upload(w http.ResponseWriter, r *http.Request) { func main() { bind := flag.String("bind", "[::]:8086", "Address to bind to") conns := flag.Int("conns", 2, "Maximal number of connections") - NotifyFromAddr = flag.String("notify-from", "uploader@example.com", "Address notifications are send to") - NotifyToAddr = flag.String("notify-to", "", "Address notifications are send from") + NotifyFromAddr = flag.String("notify-from", "uploader@example.com", "Address notifications are sent to") + NotifyToAddr = flag.String("notify-to", "", "Address notifications are sent from") flag.Parse() + log.SetFlags(log.Lshortfile) + log.SetOutput(os.Stdout) if len(*NotifyFromAddr) == 0 && len(*NotifyToAddr) > 0 { log.Fatalln("notify-from address can not be empty, if notify-to is set") }