fmt and travis update

This commit is contained in:
Sarah Jamie Lewis 2018-05-09 12:40:07 -07:00
parent 9980da3bd5
commit 6f9718596d
5 changed files with 6 additions and 6 deletions

View File

@ -12,6 +12,7 @@ install:
- go get github.com/mattn/goveralls - go get github.com/mattn/goveralls
- go get golang.org/x/net/proxy - go get golang.org/x/net/proxy
- go get github.com/golang/protobuf/proto - go get github.com/golang/protobuf/proto
- go get github.com/yawning/bulb/
script: script:

View File

@ -12,7 +12,7 @@ type ChannelManager struct {
channels map[int32]*channels.Channel channels map[int32]*channels.Channel
nextFreeChannel int32 nextFreeChannel int32
isClient bool isClient bool
lock sync.Mutex // ChannelManager may be accessed by multiple thread, so we need to protect the map. lock sync.Mutex // ChannelManager may be accessed by multiple thread, so we need to protect the map.
} }
// NewClientChannelManager construsts a new channel manager enforcing behaviour // NewClientChannelManager construsts a new channel manager enforcing behaviour

View File

@ -6,7 +6,6 @@ import (
"github.com/s-rah/go-ricochet/wire/control" "github.com/s-rah/go-ricochet/wire/control"
) )
// ControlChannel encapsulates logic for the control channel processing // ControlChannel encapsulates logic for the control channel processing
type ControlChannel struct { type ControlChannel struct {
channelManager *ChannelManager channelManager *ChannelManager

View File

@ -6,10 +6,10 @@ import (
"crypto/x509" "crypto/x509"
"encoding/pem" "encoding/pem"
"errors" "errors"
"github.com/yawning/bulb/utils/pkcs1"
"io/ioutil" "io/ioutil"
"math" "math"
"math/big" "math/big"
"github.com/yawning/bulb/utils/pkcs1"
) )
const ( const (
@ -20,7 +20,7 @@ const (
RicochetKeySize = 1024 RicochetKeySize = 1024
) )
// GetRandNumber is a helper function which returns a random integer, this is // GetRandNumber is a helper function which returns a random integer, this is
// currently mostly used to generate messageids // currently mostly used to generate messageids
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))
@ -80,4 +80,4 @@ func GetOnionAddress(privateKey *rsa.PrivateKey) (string, error) {
return "", OnionAddressGenerationError return "", OnionAddressGenerationError
} }
return addr, nil return addr, nil
} }

View File

@ -40,7 +40,7 @@ const (
// Library Use Errors // Library Use Errors
OnionAddressGenerationError = Error("OnionAddressGenerationError") OnionAddressGenerationError = Error("OnionAddressGenerationError")
PrivateKeyNotSetError = Error("PrivateKeyNotSet") PrivateKeyNotSetError = Error("PrivateKeyNotSet")
// Connection Errors // Connection Errors
ConnectionClosedError = Error("ConnectionClosedError") ConnectionClosedError = Error("ConnectionClosedError")