forked from External/grumble
Run go fmt and goimports on all files, to make them follow Golang standards
This commit is contained in:
parent
4a90b31d8d
commit
76138f47fd
15 changed files with 47 additions and 32 deletions
|
|
@ -6,6 +6,7 @@ package main
|
|||
|
||||
import (
|
||||
"encoding/hex"
|
||||
|
||||
"mumble.info/grumble/pkg/acl"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -8,10 +8,11 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"mumble.info/grumble/pkg/logtarget"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"mumble.info/grumble/pkg/logtarget"
|
||||
)
|
||||
|
||||
func SignalHandler() {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ package cryptstate
|
|||
import (
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
|
||||
"mumble.info/grumble/pkg/cryptstate/ocb2"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue