pull/64/head
Yasuhiro Matsumoto 2017-10-25 17:29:02 +09:00
parent a7e10ddba4
commit d38a3e6dfc
1 changed files with 1 additions and 7 deletions

View File

@ -4,12 +4,10 @@ import (
"bufio" "bufio"
"context" "context"
"encoding/json" "encoding/json"
"fmt"
"io" "io"
"net/http" "net/http"
"net/url" "net/url"
"path" "path"
"strconv"
"strings" "strings"
) )
@ -71,11 +69,7 @@ func handleReader(q chan Event, r io.Reader) error {
q <- &NotificationEvent{&notification} q <- &NotificationEvent{&notification}
} }
case "delete": case "delete":
var id int64 q <- &DeleteEvent{ID(strings.TrimSpace(token[1]))}
id, err = strconv.ParseInt(strings.TrimSpace(token[1]), 10, 64)
if err == nil {
q <- &DeleteEvent{ID(fmt.Sprintf("%20d", id))}
}
} }
if err != nil { if err != nil {
q <- &ErrorEvent{err} q <- &ErrorEvent{err}