fmt and travis update

pull/42/head
Sarah Jamie Lewis 4 years ago
parent 9980da3bd5
commit 6f9718596d
  1. 1
      .travis.yml
  2. 2
      connection/channelmanager.go
  3. 1
      connection/control_channel.go
  4. 6
      utils/crypto.go
  5. 2
      utils/error.go

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

@ -12,7 +12,7 @@ type ChannelManager struct {
channels map[int32]*channels.Channel
nextFreeChannel int32
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

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

@ -6,10 +6,10 @@ import (
"crypto/x509"
"encoding/pem"
"errors"
"github.com/yawning/bulb/utils/pkcs1"
"io/ioutil"
"math"
"math/big"
"github.com/yawning/bulb/utils/pkcs1"
)
const (
@ -20,7 +20,7 @@ const (
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
func GetRandNumber() *big.Int {
num, err := rand.Int(rand.Reader, big.NewInt(math.MaxUint32))
@ -80,4 +80,4 @@ func GetOnionAddress(privateKey *rsa.PrivateKey) (string, error) {
return "", OnionAddressGenerationError
}
return addr, nil
}
}

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