StringType changed

This commit is contained in:
geek 2017-04-26 17:07:49 +09:00
parent bf078e46ed
commit 64d8250a48
2 changed files with 6 additions and 6 deletions

View File

@ -78,7 +78,7 @@ func (lq *LoafleQueue) notifyEventHandler(c chan interface{}) {
}
}
func (lq *LoafleQueue) StringType(tp EventType) string {
func StringType(tp EventType) string {
var tempType string
if tp == DATA_TYPE {
@ -101,15 +101,15 @@ func NewQueue(eventType EventType, interval time.Duration) *LoafleQueue {
items := make([]*Item, 0)
event := make(chan interface{}, 0)
tempType := StringType(eventType)
lq := &LoafleQueue{
items: items,
//queueType: tempType,
queueType: tempType,
interval: interval,
eventChanel: event,
}
lq.queueType = lq.StringType(eventType)
heap.Init(lq)
observer.Add(lq.queueType, lq.eventChanel)

View File

@ -8,7 +8,7 @@ import (
func TestNewQueue(t *testing.T) {
lq := NewQueue(EVENT_TYPE, 5)
typeEvent := lq.StringType(EVENT_TYPE)
typeEvent := StringType(EVENT_TYPE)
observer.Notify(typeEvent, "data")