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 return rai
} }

View File

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

View File

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

View File

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

View File

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