fix IDs
This commit is contained in:
parent
e0cf1e0650
commit
aef736e991
8 changed files with 58 additions and 57 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"bufio"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
@ -27,7 +28,7 @@ type NotificationEvent struct {
|
|||
func (e *NotificationEvent) event() {}
|
||||
|
||||
// DeleteEvent is struct for passing deletion event to app.
|
||||
type DeleteEvent struct{ ID int64 }
|
||||
type DeleteEvent struct{ ID ID }
|
||||
|
||||
func (e *DeleteEvent) event() {}
|
||||
|
||||
|
@ -73,7 +74,7 @@ func handleReader(q chan Event, r io.Reader) error {
|
|||
var id int64
|
||||
id, err = strconv.ParseInt(strings.TrimSpace(token[1]), 10, 64)
|
||||
if err == nil {
|
||||
q <- &DeleteEvent{id}
|
||||
q <- &DeleteEvent{ID(fmt.Sprintf("%20d", id))}
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue