forked from External/grumble
go fmt
This commit is contained in:
parent
083163daf9
commit
20eba760e5
15 changed files with 163 additions and 163 deletions
|
|
@ -330,7 +330,7 @@ func (client *Client) udpRecvLoop() {
|
|||
case mumbleproto.UDPMessageVoiceCELTAlpha:
|
||||
fallthrough
|
||||
case mumbleproto.UDPMessageVoiceCELTBeta:
|
||||
if (client.server.Opus) {
|
||||
if client.server.Opus {
|
||||
return
|
||||
}
|
||||
fallthrough
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ package main
|
|||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"mumble.info/grumble/pkg/replacefile"
|
||||
"io/ioutil"
|
||||
"mumble.info/grumble/pkg/replacefile"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ func (perm Permission) IsCached() bool {
|
|||
|
||||
// Clean returns a Permission that has its cache bit cleared.
|
||||
func (perm Permission) Clean() Permission {
|
||||
return perm ^Permission(CachedPermission)
|
||||
return perm ^ Permission(CachedPermission)
|
||||
}
|
||||
|
||||
// An ACL as defined in an ACL context.
|
||||
|
|
@ -88,7 +88,7 @@ func (acl *ACL) IsChannelACL() bool {
|
|||
// The permission perm must be a single permission and not a combination of permissions.
|
||||
func HasPermission(ctx *Context, user User, perm Permission) bool {
|
||||
// We can't check permissions on a nil ctx.
|
||||
if (ctx == nil) {
|
||||
if ctx == nil {
|
||||
panic("acl: HasPermission got nil context")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ package cryptstate
|
|||
import (
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
"testing"
|
||||
"encoding/hex"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestOCB2AES128Encrypt(t *testing.T) {
|
||||
|
|
@ -88,9 +88,9 @@ func TestOCB2AES128Decrypt(t *testing.T) {
|
|||
func TestXSalsa20Poly1305Encrypt(t *testing.T) {
|
||||
cs := CryptState{}
|
||||
|
||||
var key[32]byte
|
||||
var eiv[24]byte
|
||||
var div[24]byte
|
||||
var key [32]byte
|
||||
var eiv [24]byte
|
||||
var div [24]byte
|
||||
var message [64]byte
|
||||
|
||||
for i := range key[:] {
|
||||
|
|
@ -125,9 +125,9 @@ func TestXSalsa20Poly1305Encrypt(t *testing.T) {
|
|||
func TestXSalsa20Poly1305Decrypt(t *testing.T) {
|
||||
cs := CryptState{}
|
||||
|
||||
var key[32]byte
|
||||
var eiv[24]byte
|
||||
var div[24]byte
|
||||
var key [32]byte
|
||||
var eiv [24]byte
|
||||
var div [24]byte
|
||||
var expected [64]byte
|
||||
|
||||
for i := range key[:] {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
package cryptstate
|
||||
|
||||
// nullMode implements the NULL CryptoMode
|
||||
type nullMode struct {}
|
||||
type nullMode struct{}
|
||||
|
||||
// NonceSize returns the nonce size to be used with NULL.
|
||||
func (n *nullMode) NonceSize() int {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
package cryptstate
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
"golang.org/x/crypto/nacl/secretbox"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// secretBoxMode implements the XSalsa20-Poly1305 CryptoMode
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
package replacefile
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue