Skip to content

Commit

Permalink
Remove common package
Browse files Browse the repository at this point in the history
Connect will return nil when context is canceled, so
IsContextError is no more needed. ConcurrentWriter was
unused.
  • Loading branch information
tmaxmax committed Sep 4, 2021
1 parent 44ed3ac commit 7028266
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 39 deletions.
35 changes: 0 additions & 35 deletions cmd/common/common.go

This file was deleted.

3 changes: 1 addition & 2 deletions cmd/complex_client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"syscall"

"github.com/tmaxmax/go-sse/client"
"github.com/tmaxmax/go-sse/cmd/common"
)

func main() {
Expand Down Expand Up @@ -47,7 +46,7 @@ func main() {
close(done)
}()

if err := conn.Connect(); err != nil && !common.IsContextError(err) {
if err := conn.Connect(); err != nil {
log.Println(err)
}

Expand Down
3 changes: 1 addition & 2 deletions cmd/helloworld_client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"net/http"

"github.com/tmaxmax/go-sse/client"
"github.com/tmaxmax/go-sse/cmd/common"
)

func main() {
Expand All @@ -22,7 +21,7 @@ func main() {
}
}()

if err := conn.Connect(); err != nil && !common.IsContextError(err) {
if err := conn.Connect(); err != nil {
log.Println(err)
}
}

0 comments on commit 7028266

Please sign in to comment.