Skip to content

Commit 9e94aa8

Browse files
author
Tim Middleton
authored
Remove duplicate error checking (#59)
1 parent 44201fb commit 9e94aa8

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

coherence/common.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -452,12 +452,6 @@ func executeGetAll[K comparable, V any](ctx context.Context, bc *baseClient[K, V
452452
return
453453
}
454454

455-
if err1 != nil {
456-
ch <- &StreamedEntry[K, V]{Err: err1}
457-
close(ch)
458-
return
459-
}
460-
461455
// deserialize key and value
462456
if key, err1 = bc.keySerializer.Deserialize(response.Key); err1 != nil {
463457
ch <- &StreamedEntry[K, V]{Err: err1}
@@ -1187,12 +1181,6 @@ func executeEntrySetFilter[K comparable, V any](ctx context.Context, bc *baseCli
11871181
return
11881182
}
11891183

1190-
if err1 != nil {
1191-
ch <- &StreamedEntry[K, V]{Err: err1}
1192-
close(ch)
1193-
return
1194-
}
1195-
11961184
// deserialize key and value
11971185
if key, err1 = bc.keySerializer.Deserialize(response.Key); err1 != nil {
11981186
ch <- &StreamedEntry[K, V]{Err: err1}

examples/events/cache/people_listen/main.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"fmt"
1515
"github.com/oracle/coherence-go-client/coherence"
1616
"log"
17-
"os"
1817
"time"
1918
)
2019

@@ -40,13 +39,6 @@ func main() {
4039

4140
defer session.Close()
4241

43-
session.AddSessionLifecycleListener(
44-
coherence.NewSessionLifecycleListener().
45-
OnClosed(func(event coherence.SessionLifecycleEvent) {
46-
log.Println("session closed, exiting")
47-
os.Exit(0)
48-
}))
49-
5042
// create a new NamedMap of Person with key int
5143
namedMap, err := coherence.GetNamedMap[int, Person](session, "people")
5244
if err != nil {

0 commit comments

Comments
 (0)