Skip to content

Commit

Permalink
Merge pull request #22 from oaStuff/dev
Browse files Browse the repository at this point in the history
used golint
  • Loading branch information
oaStuff authored Jan 15, 2018
2 parents 40a919b + e411e10 commit c6ebfe4
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Cluster/clusteredBigCache.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"time"
)

//Constants used to specify various conditions and state withing the system
//Constants used to specify various conditions and state within the system
const (
REPLICATION_MODE_FULL_REPLICATE byte = iota
REPLICATION_MODE_SHARD
Expand All @@ -27,7 +27,7 @@ const (
clusterModePASSIVE
)

//Channel size for all defined channels
//CHAN_SIZE for all defined channels
const CHAN_SIZE = 1024 * 64

//Global errors that can be returned to callers
Expand All @@ -38,7 +38,7 @@ var (
ErrNotStarted = errors.New("node not started, call Start()")
)

//Cluster configuration
//ClusteredBigCacheConfig is configuration for the cache
type ClusteredBigCacheConfig struct {
Id string `json:"id"`
Join bool `json:"join"`
Expand Down
2 changes: 1 addition & 1 deletion Cluster/clusteredBigCache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func TestPutData(t *testing.T) {

node2.Delete("key_1")
time.Sleep(time.Millisecond * 200)
result, err = node1.Get("key_1", time.Millisecond*200)
_, err = node1.Get("key_1", time.Millisecond*200)
if err == nil {
t.Error("error ought to be not found because the key and its data has been deleted")
}
Expand Down
2 changes: 1 addition & 1 deletion Cluster/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type replicationMsg struct {
m message.NodeMessage
}

//DefualtClusterConfig creates a new default configuration
//DefaultClusterConfig creates a new default configuration
func DefaultClusterConfig() *ClusteredBigCacheConfig {

return &ClusteredBigCacheConfig{
Expand Down
4 changes: 2 additions & 2 deletions Cluster/remoteNode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func TestNoPingResponseDisconnt(t *testing.T) {
}

if rn.metrics.pongRecieved != 0 {
t.Error("pong ought not to have been recieved")
t.Error("pong ought not to have been received")
}

rn.shutDown()
Expand Down Expand Up @@ -131,7 +131,7 @@ func TestPinging(t *testing.T) {
time.Sleep(time.Second * 3)

if rn.metrics.pongRecieved < 1 {
t.Error("pong ought to have been recieved")
t.Error("pong ought to have been received")
}

if rn.metrics.pingRecieved < 1 {
Expand Down
2 changes: 1 addition & 1 deletion message/defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type NodeMessage interface {
DeSerialize(msg *NodeWireMessage)
}

//ProposedPeers are used to represent peers that needs to be connected to
//ProposedPeer are used to represent peers that needs to be connected to
type ProposedPeer struct {
Id string
IpAddress string
Expand Down
2 changes: 1 addition & 1 deletion message/pongMessage.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package message

//PongMessage is the struct for a ping reponse (pong)
//PongMessage is the struct for a ping response (pong)
type PongMessage struct {
code uint16
}
Expand Down
2 changes: 1 addition & 1 deletion utils/sliceList.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (list *SliceList) Add(key, value interface{}) {
list.items.Store(key, value)
}

//Contains verifies if a key exist withing the list
//Contains verifies if a key exist within the list
func (list *SliceList) Contains(key interface{}) bool {
_, ok := list.items.Load(key)
return ok
Expand Down

0 comments on commit c6ebfe4

Please sign in to comment.