Run go fmt
It has some Opinions on my code. Mostly whitespace and organizing the ordering of my structs.main
parent
bbdc5325ae
commit
cc4913d573
24
main.go
24
main.go
|
@ -18,21 +18,21 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"net"
|
||||
"net/url"
|
||||
"net/http"
|
||||
"time"
|
||||
"context"
|
||||
"html/template"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"path"
|
||||
"os"
|
||||
"mime/multipart"
|
||||
"io"
|
||||
"mime/multipart"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"fmt"
|
||||
"flag"
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/mdp/qrterminal"
|
||||
)
|
||||
|
||||
|
@ -104,8 +104,8 @@ func main() {
|
|||
|
||||
server := &http.Server{
|
||||
Addr: fmt.Sprintf(":%v", conf.Port),
|
||||
ReadTimeout: 10*time.Second,
|
||||
WriteTimeout: 10*time.Second,
|
||||
ReadTimeout: 10 * time.Second,
|
||||
WriteTimeout: 10 * time.Second,
|
||||
}
|
||||
|
||||
if conf.Uploading {
|
||||
|
@ -138,7 +138,7 @@ func main() {
|
|||
// Wait for the server to finish any transfers, up to 3 seconds
|
||||
select {
|
||||
case <-done:
|
||||
case <-time.After(3*time.Second):
|
||||
case <-time.After(3 * time.Second):
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue