Fixing gofmt

This commit is contained in:
Sarah Jamie Lewis 2018-01-12 13:04:20 -05:00
parent 4ccf95bee0
commit 339995c101
5 changed files with 12 additions and 14 deletions

View File

@ -38,4 +38,3 @@ func (af *ApplicationInstanceFactory) GetApplicationInstance(rc *connection.Conn
}
return rai
}

View File

@ -121,6 +121,6 @@ func TestChatChannelOperations(t *testing.T) {
chatChannel.SendMessage("hello")
ackMessage := messageBuilder.AckChatMessage(0, true)
chatChannel.Packet(ackMessage)
chatChannel.Packet(ackMessage)
}

View File

@ -6,7 +6,7 @@ import (
)
type OverrideChatChannel struct {
channels.ChatChannel
channels.ChatChannel
}
// Singleton - for chat channels there can only be one instance per direction
@ -14,7 +14,6 @@ func (cc *OverrideChatChannel) Singleton() bool {
return false
}
func TestClientManagerDuplicateMultiple(t *testing.T) {
ccm := NewClientChannelManager()
chatChannel := new(OverrideChatChannel)

View File

@ -20,11 +20,11 @@ const (
)
func GetRandNumber() *big.Int {
num, err := rand.Int(rand.Reader, big.NewInt(math.MaxUint32))
// If we can't generate random numbers then panicking is probably
// the best option.
CheckError(err)
return num
num, err := rand.Int(rand.Reader, big.NewInt(math.MaxUint32))
// If we can't generate random numbers then panicking is probably
// the best option.
CheckError(err)
return num
}
// GeneratePrivateKey generates a new private key for use

View File

@ -1,8 +1,8 @@
package utils
import (
"testing"
"math"
"testing"
)
func TestGeneratePrivateKey(t *testing.T) {
@ -20,8 +20,8 @@ func TestLoadPrivateKey(t *testing.T) {
}
func TestGetRandNumber(t *testing.T) {
num := GetRandNumber()
if !num.IsUint64() || num.Uint64() > uint64(math.MaxUint32) {
t.Errorf("Error random number outside of expected bounds %v", num)
}
num := GetRandNumber()
if !num.IsUint64() || num.Uint64() > uint64(math.MaxUint32) {
t.Errorf("Error random number outside of expected bounds %v", num)
}
}