projects
/
kraftakt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1830c80
)
Package gfit: Check return value of readCumulative() for errors.
author
Florian Forster
<ff@octo.it>
Mon, 22 Jan 2018 21:12:48 +0000
(22:12 +0100)
committer
Florian Forster
<ff@octo.it>
Mon, 22 Jan 2018 21:14:09 +0000
(22:14 +0100)
gfit/gfit.go
patch
|
blob
|
history
diff --git
a/gfit/gfit.go
b/gfit/gfit.go
index
581a9fe
..
8f3fbac
100644
(file)
--- a/
gfit/gfit.go
+++ b/
gfit/gfit.go
@@
-240,6
+240,9
@@
func (c *Client) updateCumulative(ctx context.Context, dataSource *fitness.DataS
endOfDay := startOfDay.Add(24 * time.Hour).Add(-1 * time.Nanosecond)
currValue, startTime, err := c.readCumulative(ctx, dataSource, startOfDay, endOfDay)
+ if err != nil {
+ return err
+ }
var diffValue fitness.Value
if dataSource.DataType.Field[0].Format == "integer" {