Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
thegeekyasian authored Feb 8, 2023
1 parent ce83418 commit 15bcaa6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type resource struct {

...

rr, _ := roundrobin.New[resource](
rr, _ := roundrobin.New(
&resource{1, "resource-1"},
&resource{2, "resource-2"},
&resource{3, "resource-3"},
Expand All @@ -43,7 +43,7 @@ one := "One"
two := "Two"
three := "Three"

rr, _ := roundrobin.New[string](&one, &two, &three)
rr, _ := roundrobin.New(&one, &two, &three)

rr.Next() // One
rr.Next() // Two
Expand All @@ -53,11 +53,11 @@ rr.Next() // One

### URLs
```go
rr, _ := roundrobin.New[url.URL](
url.URL{Host: "192.168.0.1"},
url.URL{Host: "192.168.0.2"},
url.URL{Host: "192.168.0.3"},
url.URL{Host: "192.168.0.4"},
rr, _ := roundrobin.New(
&url.URL{Host: "192.168.0.1"},
&url.URL{Host: "192.168.0.2"},
&url.URL{Host: "192.168.0.3"},
&url.URL{Host: "192.168.0.4"},
)

rr.Next() // 192.168.0.1
Expand Down

0 comments on commit 15bcaa6

Please sign in to comment.