projects
/
svn42.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
237458a
)
better msg format
author
Bernhard Tittelbach
<xro@realraum.at>
Thu, 3 Oct 2013 00:34:00 +0000
(
00:34
+0000)
committer
Bernhard Tittelbach
<xro@realraum.at>
Thu, 3 Oct 2013 00:34:00 +0000
(
00:34
+0000)
go/r3-eventbroker_zmq/sockettoevent.go
patch
|
blob
|
history
diff --git
a/go/r3-eventbroker_zmq/sockettoevent.go
b/go/r3-eventbroker_zmq/sockettoevent.go
index
6664a97
..
94d8996
100644
(file)
--- a/
go/r3-eventbroker_zmq/sockettoevent.go
+++ b/
go/r3-eventbroker_zmq/sockettoevent.go
@@
-145,12
+145,12
@@
func MakeTimeTick(ps *pubsub.PubSub) {
func FormatEventForSocket(event_interface interface{}) (data [][]byte, err error) {
var msg []byte
fmt.Printf("%T%+v\n", event_interface, event_interface)
- etype := fmt.Sprintf("%T", event_interface)[5:]
- msg, err = json.Marshal(map[string]interface{}{etype: event_interface})
+ msg, err = json.Marshal(event_interface)
if err != nil {
return
}
- data = [][]byte{msg}
+ etype := []byte(fmt.Sprintf("%T", event_interface)[5:])
+ data = [][]byte{etype, msg}
return
}