From 71928754252649558474ebc7ce79da66f86f4a30 Mon Sep 17 00:00:00 2001 From: Giulio Micheloni Date: Wed, 17 Aug 2022 21:50:16 +0100 Subject: [PATCH] Update README with generics support --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f9e5949..a3c5817 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ import ( "github.com/bigmikes/drr" ) -func sourceRequests(s string) <-chan interface{} { - inChan := make(chan interface{}, 5) +func sourceRequests(s string) <-chan string { + inChan := make(chan string, 5) go func() { defer close(inChan) for i := 0; i < 5; i++ { @@ -63,7 +63,7 @@ func sourceRequests(s string) <-chan interface{} { func main() { // Set output channel and create DRR scheduler. - outputChan := make(chan interface{}, 5) + outputChan := make(chan string, 5) drr, err := drr.NewDRR(outputChan) if err != nil { panic(err)