Run go fmt

It has some Opinions on my code. Mostly whitespace and organizing the ordering of my structs.
main
diff 2021-03-25 19:22:41 +00:00
parent bbdc5325ae
commit cc4913d573
1 changed files with 35 additions and 35 deletions

24
main.go
View File

@ -18,21 +18,21 @@
package main package main
import ( import (
"net"
"net/url"
"net/http"
"time"
"context" "context"
"html/template" "html/template"
"net"
"net/http"
"net/url"
"time"
"path"
"os"
"mime/multipart"
"io" "io"
"mime/multipart"
"os"
"path"
"fmt"
"flag"
"errors" "errors"
"flag"
"fmt"
"github.com/mdp/qrterminal" "github.com/mdp/qrterminal"
) )
@ -104,8 +104,8 @@ func main() {
server := &http.Server{ server := &http.Server{
Addr: fmt.Sprintf(":%v", conf.Port), Addr: fmt.Sprintf(":%v", conf.Port),
ReadTimeout: 10*time.Second, ReadTimeout: 10 * time.Second,
WriteTimeout: 10*time.Second, WriteTimeout: 10 * time.Second,
} }
if conf.Uploading { if conf.Uploading {
@ -138,7 +138,7 @@ func main() {
// Wait for the server to finish any transfers, up to 3 seconds // Wait for the server to finish any transfers, up to 3 seconds
select { select {
case <-done: case <-done:
case <-time.After(3*time.Second): case <-time.After(3 * time.Second):
} }
} }