From d38a3e6dfcc25e799eaecd9fc4e7bbe5b6262ea3 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Wed, 25 Oct 2017 17:29:02 +0900 Subject: [PATCH] fix ID --- streaming.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/streaming.go b/streaming.go index 5b99180..4689ece 100644 --- a/streaming.go +++ b/streaming.go @@ -4,12 +4,10 @@ import ( "bufio" "context" "encoding/json" - "fmt" "io" "net/http" "net/url" "path" - "strconv" "strings" ) @@ -71,11 +69,7 @@ func handleReader(q chan Event, r io.Reader) error { q <- &NotificationEvent{¬ification} } case "delete": - var id int64 - id, err = strconv.ParseInt(strings.TrimSpace(token[1]), 10, 64) - if err == nil { - q <- &DeleteEvent{ID(fmt.Sprintf("%20d", id))} - } + q <- &DeleteEvent{ID(strings.TrimSpace(token[1]))} } if err != nil { q <- &ErrorEvent{err}