Creating circleci job to just lint and vet code
This commit is contained in:
@@ -457,7 +457,7 @@ func NewStatLine(oldStat, newStat ServerStatus, key string, all bool, sampleSecs
|
||||
oldStat.ExtraInfo.PageFaults != nil && newStat.ExtraInfo.PageFaults != nil {
|
||||
returnVal.Faults = diff(*(newStat.ExtraInfo.PageFaults), *(oldStat.ExtraInfo.PageFaults), sampleSecs)
|
||||
}
|
||||
if !returnVal.IsMongos && oldStat.Locks != nil && oldStat.Locks != nil {
|
||||
if !returnVal.IsMongos && oldStat.Locks != nil {
|
||||
globalCheck, hasGlobal := oldStat.Locks["Global"]
|
||||
if hasGlobal && globalCheck.AcquireCount != nil {
|
||||
// This appears to be a 3.0+ server so the data in these fields do *not* refer to
|
||||
|
||||
@@ -118,7 +118,7 @@ func (s *Server) addClusterStats(acc plugins.Accumulator) error {
|
||||
defer cursor.Close()
|
||||
var clusterStats stats
|
||||
if err := cursor.One(&clusterStats); err != nil {
|
||||
return fmt.Errorf("failure to parse cluster stats, $s\n", err.Error())
|
||||
return fmt.Errorf("failure to parse cluster stats, %s\n", err.Error())
|
||||
}
|
||||
|
||||
tags := s.getDefaultTags()
|
||||
@@ -146,7 +146,7 @@ func (s *Server) addMemberStats(acc plugins.Accumulator) error {
|
||||
defer cursor.Close()
|
||||
var memberStats stats
|
||||
if err := cursor.One(&memberStats); err != nil {
|
||||
return fmt.Errorf("failure to parse member stats, $s\n", err.Error())
|
||||
return fmt.Errorf("failure to parse member stats, %s\n", err.Error())
|
||||
}
|
||||
|
||||
tags := s.getDefaultTags()
|
||||
|
||||
@@ -45,7 +45,7 @@ func TestDisk_io_counters(t *testing.T) {
|
||||
t.Errorf("error %v", err)
|
||||
}
|
||||
if len(ret) == 0 {
|
||||
t.Errorf("ret is empty", ret)
|
||||
t.Errorf("ret is empty: %s", ret)
|
||||
}
|
||||
empty := DiskIOCountersStat{}
|
||||
for part, io := range ret {
|
||||
|
||||
Reference in New Issue
Block a user