Skip to content

Commit

Permalink
Merge pull request #34 from gochore/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfogre authored Feb 9, 2021
2 parents 4aa4d44 + d8a6a1c commit d60f1ac
Show file tree
Hide file tree
Showing 29 changed files with 1,902 additions and 897 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
generage:
generate:
rm -f gen_*.go
go run cmd/generate/main.go

test:
go test -v

all: generate test

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func main() {
})

// merge data
slice2 := timeseq.Ints{
seq2 := timeseq.WrapIntSeq(timeseq.Ints{
{
Time: now.Add(time.Second),
Value: 1,
Expand All @@ -103,8 +103,8 @@ func main() {
Time: now.Add(-time.Second),
Value: 2,
},
}
if err := seq.Merge(func(t time.Time, v1, v2 *int) *int {
})
newSeq := seq.Merge(func(t time.Time, v1, v2 *int) *int {
if v1 == nil {
return v2
}
Expand All @@ -113,9 +113,9 @@ func main() {
}
ret := *v1 + *v2
return &ret
}, slice2); err != nil {
panic(err)
}
}, seq2)

_ = newSeq
}
```

12 changes: 6 additions & 6 deletions _example/simple/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {
})

// merge data
slice2 := timeseq.Ints{
seq2 := timeseq.WrapIntSeq(timeseq.Ints{
{
Time: now.Add(time.Second),
Value: 1,
Expand All @@ -76,8 +76,8 @@ func main() {
Time: now.Add(-time.Second),
Value: 2,
},
}
if err := seq.Merge(func(t time.Time, v1, v2 *int) *int {
})
newSeq := seq.Merge(func(t time.Time, v1, v2 *int) *int {
if v1 == nil {
return v2
}
Expand All @@ -86,7 +86,7 @@ func main() {
}
ret := *v1 + *v2
return &ret
}, slice2); err != nil {
panic(err)
}
}, seq2)

_ = newSeq
}
Loading

0 comments on commit d60f1ac

Please sign in to comment.