From 2fc526bccc65ba98fd461dbdf9694d8efbb005ad Mon Sep 17 00:00:00 2001 From: "Derrick J. Wippler" Date: Tue, 6 Apr 2021 14:07:06 -0500 Subject: [PATCH] Update README.md It should be clear you must include self when calling `pool.Set()` See #27 --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fd1ec51..2a8baa6 100644 --- a/README.md +++ b/README.md @@ -90,14 +90,14 @@ import ( ) func ExampleUsage() { - // Keep track of peers in our cluster and add our instance to the pool `http://localhost:8080` - pool := groupcache.NewHTTPPoolOpts("http://localhost:8080", &groupcache.HTTPPoolOptions{}) + // Keep track of peers in our cluster and add our instance to the pool `http://192.168.1.1:8080` + pool := groupcache.NewHTTPPoolOpts("http://192.168.1.1:8080", &groupcache.HTTPPoolOptions{}) - // Add more peers to the cluster - pool.Set("http://peer1:8080", "http://peer2:8080") + // Add more peers to the cluster (Ensure our instance is included) + pool.Set("http://192.168.1.1:8080", "http://192.168.1.2:8080", "http://192.168.1.3:8080") server := http.Server{ - Addr: "localhost:8080", + Addr: "192.168.1.1:8080", Handler: pool, }