Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
a0733f70e5 | |||
53dc8a68a3 |
@ -56,6 +56,9 @@ func calculateDifference(key string, newValue string) (string, error) {
|
||||
Timestamp: currentTime,
|
||||
Value: newValue,
|
||||
}
|
||||
if diffValuePerSecond < 0 {
|
||||
return "", fmt.Errorf("negative difference value: %d", diffValuePerSecond)
|
||||
}
|
||||
return strconv.Itoa(diffValuePerSecond), nil
|
||||
} else {
|
||||
log.Printf("create lvv for %s", key)
|
||||
|
Reference in New Issue
Block a user