forked from openprivacy/libricochet-go
Fixing gofmt
This commit is contained in:
parent
4ccf95bee0
commit
339995c101
|
@ -38,4 +38,3 @@ func (af *ApplicationInstanceFactory) GetApplicationInstance(rc *connection.Conn
|
||||||
}
|
}
|
||||||
return rai
|
return rai
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue