Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
arknable committed May 5, 2021
1 parent b2915a5 commit 7729e68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ q.Push(2)

Under the hood, `Queue` uses slice with default capacity of 10, to increase the capacity use `QueueOptions`.
```
q = New(&QueueOptions{
q = qfifo.New(&QueueOptions{
InitialSize: 20,
})
q.Push(1)
Expand All @@ -30,7 +30,7 @@ To add an element, use `Push()` and to pull an element out use `Pop()`. All meth

To create a publisher:
```
p, err = NewPublisher(PublisherArgs{
p, err = qfifo.NewPublisher(PublisherArgs{
PublishFunc: func(p *Publisher, v interface{}) {
// v is the pulled element
fmt.Println(v.(int)) // assuming the queued elements are integers
Expand Down

0 comments on commit 7729e68

Please sign in to comment.