-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
operations.go
Outdated
@@ -12,22 +12,24 @@ import ( | |||
|
|||
type writerF func(string, string, interface{}, int) (gocb.Cas, error) | |||
type readerF func(string, string, interface{}, int) (gocb.Cas, error) | |||
type CAS map[string]gocb.Cas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to Cas
operations_test.go
Outdated
if err != nil || id == "" { | ||
t.Fatal(err) | ||
} | ||
if len(cas) != 3 { | ||
t.Error("error") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide better error something like, t.Errorf("Cas should store 3 elements, instead of %d", len(cas))
. We are writing these errors for people who possible won't know anything about the system.
operations_test.go
Outdated
if err != nil || id == "" { | ||
t.Error("Missing error") | ||
} | ||
if len(cas) != 1 { | ||
t.Error("error") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same error here
operations_test.go
Outdated
if err != nil || id == "" { | ||
t.Error("Missing error") | ||
} | ||
if len(cas) != 1 { | ||
t.Error("error") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same error here
operations_test.go
Outdated
if err != nil || id == "" { | ||
t.Error("Missing error") | ||
} | ||
if len(cas) != 1 { | ||
t.Error("error") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same error here
#39