Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/grumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOla Bini <ola@autonomia.digital>2019-12-21 01:51:21 +0300
committerOla Bini <ola@autonomia.digital>2019-12-21 01:51:21 +0300
commit76138f47fd711b7b1826d8ce6a9674ea29167fd4 (patch)
treee978ad50b95fae5c0c568915458115146cd8088d
parent4a90b31d8ddd37af1f15645b202528e0db155275 (diff)
Run go fmt and goimports on all files, to make them follow Golang standards
-rw-r--r--cmd/grumble/channel.go1
-rw-r--r--cmd/grumble/client.go9
-rw-r--r--cmd/grumble/freeze.go11
-rw-r--r--cmd/grumble/freeze_unix.go3
-rw-r--r--cmd/grumble/freeze_windows.go5
-rw-r--r--cmd/grumble/grumble.go5
-rw-r--r--cmd/grumble/message.go5
-rw-r--r--cmd/grumble/murmurdb.go5
-rw-r--r--cmd/grumble/server.go19
-rw-r--r--cmd/grumble/signal_unix.go3
-rw-r--r--pkg/cryptstate/mode_ocb2.go1
-rw-r--r--pkg/cryptstate/mode_secretbox.go3
-rw-r--r--pkg/freezer/freezer_test.go3
-rw-r--r--pkg/freezer/walker.go3
-rw-r--r--pkg/freezer/writer.go3
15 files changed, 47 insertions, 32 deletions
diff --git a/cmd/grumble/channel.go b/cmd/grumble/channel.go
index 7d38863..672c439 100644
--- a/cmd/grumble/channel.go
+++ b/cmd/grumble/channel.go
@@ -6,6 +6,7 @@ package main
import (
"encoding/hex"
+
"mumble.info/grumble/pkg/acl"
)
diff --git a/cmd/grumble/client.go b/cmd/grumble/client.go
index 493e25a..8fb1650 100644
--- a/cmd/grumble/client.go
+++ b/cmd/grumble/client.go
@@ -10,16 +10,17 @@ import (
"crypto/tls"
"encoding/binary"
"errors"
- "github.com/golang/protobuf/proto"
"io"
"log"
+ "net"
+ "runtime"
+ "time"
+
+ "github.com/golang/protobuf/proto"
"mumble.info/grumble/pkg/acl"
"mumble.info/grumble/pkg/cryptstate"
"mumble.info/grumble/pkg/mumbleproto"
"mumble.info/grumble/pkg/packetdata"
- "net"
- "runtime"
- "time"
)
// A client connection
diff --git a/cmd/grumble/freeze.go b/cmd/grumble/freeze.go
index b2937a2..530cfb3 100644
--- a/cmd/grumble/freeze.go
+++ b/cmd/grumble/freeze.go
@@ -6,19 +6,20 @@ package main
import (
"errors"
- "github.com/golang/protobuf/proto"
"io"
"io/ioutil"
"log"
+ "os"
+ "path/filepath"
+ "strconv"
+ "time"
+
+ "github.com/golang/protobuf/proto"
"mumble.info/grumble/pkg/acl"
"mumble.info/grumble/pkg/ban"
"mumble.info/grumble/pkg/freezer"
"mumble.info/grumble/pkg/mumbleproto"
"mumble.info/grumble/pkg/serverconf"
- "os"
- "path/filepath"
- "strconv"
- "time"
)
// Freeze a server to disk and closes the log file.
diff --git a/cmd/grumble/freeze_unix.go b/cmd/grumble/freeze_unix.go
index 9eea130..539b9f9 100644
--- a/cmd/grumble/freeze_unix.go
+++ b/cmd/grumble/freeze_unix.go
@@ -7,11 +7,12 @@
package main
import (
- "github.com/golang/protobuf/proto"
"io/ioutil"
"os"
"path/filepath"
"strconv"
+
+ "github.com/golang/protobuf/proto"
)
func (server *Server) freezeToFile() (err error) {
diff --git a/cmd/grumble/freeze_windows.go b/cmd/grumble/freeze_windows.go
index bc432b4..2162110 100644
--- a/cmd/grumble/freeze_windows.go
+++ b/cmd/grumble/freeze_windows.go
@@ -5,12 +5,13 @@
package main
import (
- "github.com/golang/protobuf/proto"
"io/ioutil"
- "mumble.info/grumble/pkg/replacefile"
"os"
"path/filepath"
"strconv"
+
+ "github.com/golang/protobuf/proto"
+ "mumble.info/grumble/pkg/replacefile"
)
func (server *Server) freezeToFile() (err error) {
diff --git a/cmd/grumble/grumble.go b/cmd/grumble/grumble.go
index 6807165..56eaa9a 100644
--- a/cmd/grumble/grumble.go
+++ b/cmd/grumble/grumble.go
@@ -8,11 +8,12 @@ import (
"flag"
"fmt"
"log"
- "mumble.info/grumble/pkg/blobstore"
- "mumble.info/grumble/pkg/logtarget"
"os"
"path/filepath"
"regexp"
+
+ "mumble.info/grumble/pkg/blobstore"
+ "mumble.info/grumble/pkg/logtarget"
)
var servers map[int64]*Server
diff --git a/cmd/grumble/message.go b/cmd/grumble/message.go
index 7947348..417faba 100644
--- a/cmd/grumble/message.go
+++ b/cmd/grumble/message.go
@@ -8,13 +8,14 @@ import (
"crypto/aes"
"crypto/tls"
"fmt"
+ "net"
+ "time"
+
"github.com/golang/protobuf/proto"
"mumble.info/grumble/pkg/acl"
"mumble.info/grumble/pkg/ban"
"mumble.info/grumble/pkg/freezer"
"mumble.info/grumble/pkg/mumbleproto"
- "net"
- "time"
)
type Message struct {
diff --git a/cmd/grumble/murmurdb.go b/cmd/grumble/murmurdb.go
index a3a5116..83cd2c9 100644
--- a/cmd/grumble/murmurdb.go
+++ b/cmd/grumble/murmurdb.go
@@ -13,12 +13,13 @@ import (
"database/sql"
"errors"
"log"
- "mumble.info/grumble/pkg/acl"
- "mumble.info/grumble/pkg/ban"
"net"
"os"
"path/filepath"
"strconv"
+
+ "mumble.info/grumble/pkg/acl"
+ "mumble.info/grumble/pkg/ban"
)
const (
diff --git a/cmd/grumble/server.go b/cmd/grumble/server.go
index ddf67bd..c9fd411 100644
--- a/cmd/grumble/server.go
+++ b/cmd/grumble/server.go
@@ -15,9 +15,16 @@ import (
"encoding/hex"
"errors"
"fmt"
- "github.com/golang/protobuf/proto"
"hash"
"log"
+ "net"
+ "net/http"
+ "path/filepath"
+ "strings"
+ "sync"
+ "time"
+
+ "github.com/golang/protobuf/proto"
"mumble.info/grumble/pkg/acl"
"mumble.info/grumble/pkg/ban"
"mumble.info/grumble/pkg/freezer"
@@ -27,12 +34,6 @@ import (
"mumble.info/grumble/pkg/serverconf"
"mumble.info/grumble/pkg/sessionpool"
"mumble.info/grumble/pkg/web"
- "net"
- "net/http"
- "path/filepath"
- "strings"
- "sync"
- "time"
)
// The default port a Murmur server listens on
@@ -1452,9 +1453,9 @@ func (server *Server) Start() (err error) {
// Set sensible timeouts, in case no reverse proxy is in front of Grumble.
// Non-conforming (or malicious) clients may otherwise block indefinitely and cause
// file descriptors (or handles, depending on your OS) to leak and/or be exhausted
- ReadTimeout: 5 * time.Second,
+ ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second,
- IdleTimeout: 2 * time.Minute,
+ IdleTimeout: 2 * time.Minute,
}
go func() {
err := server.webhttp.ListenAndServeTLS("", "")
diff --git a/cmd/grumble/signal_unix.go b/cmd/grumble/signal_unix.go
index 10b384d..7127f24 100644
--- a/cmd/grumble/signal_unix.go
+++ b/cmd/grumble/signal_unix.go
@@ -8,10 +8,11 @@ package main
import (
"fmt"
- "mumble.info/grumble/pkg/logtarget"
"os"
"os/signal"
"syscall"
+
+ "mumble.info/grumble/pkg/logtarget"
)
func SignalHandler() {
diff --git a/pkg/cryptstate/mode_ocb2.go b/pkg/cryptstate/mode_ocb2.go
index 1633f72..874080f 100644
--- a/pkg/cryptstate/mode_ocb2.go
+++ b/pkg/cryptstate/mode_ocb2.go
@@ -7,6 +7,7 @@ package cryptstate
import (
"crypto/aes"
"crypto/cipher"
+
"mumble.info/grumble/pkg/cryptstate/ocb2"
)
diff --git a/pkg/cryptstate/mode_secretbox.go b/pkg/cryptstate/mode_secretbox.go
index 059b70a..ec45fb6 100644
--- a/pkg/cryptstate/mode_secretbox.go
+++ b/pkg/cryptstate/mode_secretbox.go
@@ -5,8 +5,9 @@
package cryptstate
import (
- "golang.org/x/crypto/nacl/secretbox"
"unsafe"
+
+ "golang.org/x/crypto/nacl/secretbox"
)
// secretBoxMode implements the XSalsa20-Poly1305 CryptoMode
diff --git a/pkg/freezer/freezer_test.go b/pkg/freezer/freezer_test.go
index 4e0d8a7..f07536f 100644
--- a/pkg/freezer/freezer_test.go
+++ b/pkg/freezer/freezer_test.go
@@ -7,12 +7,13 @@ package freezer
import (
"bytes"
"encoding/binary"
- "github.com/golang/protobuf/proto"
"hash/crc32"
"io"
"math"
"os"
"testing"
+
+ "github.com/golang/protobuf/proto"
)
var testValues []proto.Message = []proto.Message{
diff --git a/pkg/freezer/walker.go b/pkg/freezer/walker.go
index 20d6267..a6a1a32 100644
--- a/pkg/freezer/walker.go
+++ b/pkg/freezer/walker.go
@@ -6,11 +6,12 @@ package freezer
import (
"encoding/binary"
- "github.com/golang/protobuf/proto"
"hash"
"hash/crc32"
"io"
"math"
+
+ "github.com/golang/protobuf/proto"
)
// Checks whether the error err is an EOF
diff --git a/pkg/freezer/writer.go b/pkg/freezer/writer.go
index b51c26a..e58d699 100644
--- a/pkg/freezer/writer.go
+++ b/pkg/freezer/writer.go
@@ -18,12 +18,13 @@ package freezer
import (
"bytes"
"encoding/binary"
- "github.com/golang/protobuf/proto"
"hash"
"hash/crc32"
"io"
"math"
"os"
+
+ "github.com/golang/protobuf/proto"
)
// Log implements an append-only log for flattened