diff --git a/bell.go b/bell.go index 7c5f558..c25048e 100644 --- a/bell.go +++ b/bell.go @@ -24,7 +24,7 @@ type Events struct { sync.RWMutex channels map[string][]chan Message wg sync.WaitGroup - queueSize int + queueSize uint } // New constructor for Events @@ -33,7 +33,7 @@ func New() *Events { } // Queue set events queue size -func (e *Events) Queue(size int) *Events { +func (e *Events) Queue(size uint) *Events { e.Lock() defer e.Unlock() @@ -180,6 +180,6 @@ func Wait() { } // Queue set events queue size -func Queue(size int) { +func Queue(size uint) { globalState.Queue(size) } diff --git a/bell_test.go b/bell_test.go index 7ba6a92..248b97a 100644 --- a/bell_test.go +++ b/bell_test.go @@ -124,7 +124,7 @@ func TestWait(t *testing.T) { // TestQueue checking function for set queue size func TestQueue(t *testing.T) { - size := 6 + var size uint = 6 Queue(size) assert.Equal(t, size, globalState.queueSize) }